diff options
| author | Jinghua Luo <sunmoon1997@gmail.com> | 2008-04-07 17:27:49 +0100 |
|---|---|---|
| committer | Jinghua Luo <sunmoon1997@gmail.com> | 2008-04-07 17:27:49 +0100 |
| commit | d3bb60048b4ff30adc379f5e1eab62db8354db8b (patch) | |
| tree | 527a2eb2c04e7662e992ce9bf97f450a0ad62a4f /src/combined/ffmpeg/ff_video_decoder.c | |
| parent | aae81ebc2ba5f815d8cc153b1edabb70fda440ca (diff) | |
| download | xine-lib-d3bb60048b4ff30adc379f5e1eab62db8354db8b.tar.gz xine-lib-d3bb60048b4ff30adc379f5e1eab62db8354db8b.tar.bz2 | |
Use ffmpeg's cook decoder and fix Real decoder bugs
This patch drops support for RV20.
Diffstat (limited to 'src/combined/ffmpeg/ff_video_decoder.c')
| -rw-r--r-- | src/combined/ffmpeg/ff_video_decoder.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 4e772dbca..02282990b 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -944,6 +944,26 @@ static void ff_handle_header_buffer (ff_video_decoder_t *this, buf_element_t *bu this->context->slice_offset = xine_xmalloc(sizeof(int)*SLICE_OFFSET_SIZE); this->slice_offset_size = SLICE_OFFSET_SIZE; + this->context->extradata_size = this->size - 26; + if (this->context->extradata_size < 8) { + this->context->extradata_size= 8; + this->context->extradata = malloc(this->context->extradata_size + + FF_INPUT_BUFFER_PADDING_SIZE); + ((uint32_t *)this->context->extradata)[0] = 0; + if (codec_type == BUF_VIDEO_RV10) + ((uint32_t *)this->context->extradata)[1] = 0x10000000; + else + ((uint32_t *)this->context->extradata)[1] = 0x10003001; + } else { + this->context->extradata = malloc(this->context->extradata_size + + FF_INPUT_BUFFER_PADDING_SIZE); + memcpy(this->context->extradata, this->buf + 26, + this->context->extradata_size); + } + + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + "ffmpeg_video_dec: buf size %d\n", this->size); + lprintf("w=%d, h=%d\n", this->bih.biWidth, this->bih.biHeight); break; |
