diff options
author | cvs2svn <admin@example.com> | 2010-02-07 01:39:30 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2010-02-07 01:39:30 +0000 |
commit | 3c2b5df6fbd812c3404cd18d062219bbec96d7e4 (patch) | |
tree | d7cc92e45d3b21d3567538e0e4d16ebb6bb1bb8e /xine/BluRay/patches/xine-lib-1.1.16.3-ffmpeg-vc1-extradata.diff | |
parent | f7c1f7c41b2f59ff5f9bf5748949a7023b50662a (diff) | |
parent | 7a47234e4ed7c1761e4d3478dee2db9779ad79e3 (diff) | |
download | xineliboutput-1_0_5.tar.gz xineliboutput-1_0_5.tar.bz2 |
This commit was manufactured by cvs2svn to create tag 'xineliboutput-1_0_5'.xineliboutput-1_0_5
Diffstat (limited to 'xine/BluRay/patches/xine-lib-1.1.16.3-ffmpeg-vc1-extradata.diff')
-rw-r--r-- | xine/BluRay/patches/xine-lib-1.1.16.3-ffmpeg-vc1-extradata.diff | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/xine/BluRay/patches/xine-lib-1.1.16.3-ffmpeg-vc1-extradata.diff b/xine/BluRay/patches/xine-lib-1.1.16.3-ffmpeg-vc1-extradata.diff new file mode 100644 index 00000000..c37c7e28 --- /dev/null +++ b/xine/BluRay/patches/xine-lib-1.1.16.3-ffmpeg-vc1-extradata.diff @@ -0,0 +1,62 @@ +--- src/combined/ffmpeg/ff_video_decoder.c 2009-04-16 14:24:20.000000000 +0300 ++++ src/combined/ffmpeg/ff_video_decoder.c 2009-09-24 15:21:25.000000000 +0300 +@@ -1165,6 +1181,49 @@ + } + } + ++static int ff_vc1_find_header(ff_video_decoder_t *this, buf_element_t *buf) ++{ ++ uint8_t *p = buf->content; ++ ++ if (!p[0] && !p[1] && p[2] == 1 && p[3] == 0x0f) { ++ int i; ++ ++ this->context->extradata = calloc(1, buf->size); ++ this->context->extradata_size = 0; ++ ++ for (i = 0; i < buf->size && i < 128; i++) { ++ if (!p[i] && !p[i+1] && p[i+2]) { ++ lprintf("00 00 01 %02x at %d\n", p[i+3], i); ++ if (p[i+3] != 0x0e && p[i+3] != 0x0f) ++ break; ++ } ++ this->context->extradata[i] = p[i]; ++ this->context->extradata_size++; ++ } ++ ++ lprintf("ff_video_decoder: found VC1 sequence header\n"); ++ return 1; ++ } ++ ++ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, ++ "ffmpeg_video_dec: VC1 extradata missing !\n"); ++ return 0; ++} ++ ++static int ff_check_extradata(ff_video_decoder_t *this, unsigned int codec_type, buf_element_t *buf) ++{ ++ if (this->context && this->context->extradata) ++ return 1; ++ ++ switch (codec_type) { ++ case BUF_VIDEO_VC1: ++ return ff_vc1_find_header(this, buf); ++ default:; ++ } ++ ++ return 1; ++} ++ + #endif /* AVCODEC_HAS_REORDERED_OPAQUE */ + static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf) { + uint8_t *chunk_buf = this->buf; +@@ -1176,6 +1235,9 @@ + if (this->decoder_init_mode) { + int codec_type = buf->type & 0xFFFF0000; + ++ if (!ff_check_extradata(this, codec_type, buf)) ++ return; ++ + /* init ffmpeg decoder */ + init_video_codec(this, codec_type); + init_postprocess(this); |