[FFmpeg-devel] [PATCH] In vc1 decoder, fix decoding when end sequence is present

Måns Rullgård mans
Wed Mar 2 14:33:04 CET 2011


Kostya <kostya.shishkov at gmail.com> writes:

> On Wed, Mar 02, 2011 at 03:17:33AM -0800, Baptiste Coudurier wrote:
>> ---
>>  libavcodec/vc1dec.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>> 
>> diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
>> index ed92d8c..b27b6d0 100644
>> --- a/libavcodec/vc1dec.c
>> +++ b/libavcodec/vc1dec.c
>> @@ -3149,7 +3149,7 @@ static int vc1_decode_frame(AVCodecContext *avctx,
>>      const uint8_t *buf_start = buf;
>>  
>>      /* no supplementary picture */
>> -    if (buf_size == 0) {
>> +    if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == VC1_CODE_ENDOFSEQ)) {
>>          /* special case for last picture */
>>          if (s->low_delay==0 && s->next_picture_ptr) {
>>              *pict= *(AVFrame*)s->next_picture_ptr;
>
> looks ok

Queued.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list