summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2013-09-22 12:07:27 +0300
committerPetri Hintukainen <phintuka@users.sourceforge.net>2013-09-22 12:07:27 +0300
commitd880e292d0041db40dd7cb1e6549808f9a8e7a20 (patch)
treef4c7d11abf3149ca73e2ba6c500e5d9fd3a5011b /src
parentbd411e04f37dec16d8cffc3fc0e593f23e3e2dce (diff)
downloadxine-lib-d880e292d0041db40dd7cb1e6549808f9a8e7a20.tar.gz
xine-lib-d880e292d0041db40dd7cb1e6549808f9a8e7a20.tar.bz2
Fix VC1 decoding
Diffstat (limited to 'src')
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c
index b07d687b2..2de40409b 100644
--- a/src/combined/ffmpeg/ff_video_decoder.c
+++ b/src/combined/ffmpeg/ff_video_decoder.c
@@ -1100,6 +1100,35 @@ static int ff_vc1_find_header(ff_video_decoder_t *this, buf_element_t *buf)
}
lprintf("ff_video_decoder: found VC1 sequence header\n");
+
+#if AVPARSE > 1
+ AVCodecParserContext *parser_context;
+ uint8_t *outbuf;
+ int outsize;
+
+ parser_context = av_parser_init(CODEC_ID_VC1);
+ if (!parser_context) {
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ "ffmpeg_video_dec: couldn't init VC1 parser\n");
+ return 1;
+ }
+
+ parser_context->flags |= PARSER_FLAG_COMPLETE_FRAMES;
+ av_parser_parse2 (parser_context, this->context,
+ &outbuf, &outsize, this->context->extradata, this->context->extradata_size,
+ 0, 0, 0);
+
+
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ "ffmpeg_video_dec: parsed VC1 video size %dx%d\n",
+ this->context->width, this->context->height);
+
+ this->bih.biWidth = this->context->width;
+ this->bih.biHeight = this->context->height;
+
+ av_parser_close(parser_context);
+#endif /* AVPARSE > 1 */
+
return 1;
}