[FFmpeg-cvslog] r12438 - trunk/libavcodec/mpeg12.c

Baptiste Coudurier baptiste.coudurier
Fri Mar 14 11:42:33 CET 2008


Hi,

Reimar D?ffinger wrote:
> Hello,
> On Fri, Mar 14, 2008 at 10:33:39AM +0100, bcoudurier wrote:
>> Author: bcoudurier
>> Date: Fri Mar 14 10:33:38 2008
>> New Revision: 12438
>>
>> Log:
>> log aspect ratio forbidden value, and fail if error resilience is high
>>
>> Modified:
>>    trunk/libavcodec/mpeg12.c
>>
>> Modified: trunk/libavcodec/mpeg12.c
>> ==============================================================================
>> --- trunk/libavcodec/mpeg12.c	(original)
>> +++ trunk/libavcodec/mpeg12.c	Fri Mar 14 10:33:38 2008
>> @@ -1970,6 +1970,11 @@ static int mpeg1_decode_sequence(AVCodec
>>          (width % 2) != 0 || (height % 2) != 0)
>>          return -1;
>>      s->aspect_ratio_info= get_bits(&s->gb, 4);
>> +    if (s->aspect_ratio_info == 0) {
>> +        av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n");
>> +        if (avctx->error_resilience >= FF_ER_COMPLIANT)
>> +            return -1;
>> +    }
> 
> Sorry for being late to the discussion, but isn't that backwards? A
> higher error resilience should deal with _more_ errors, not _fail
> more_?!
> In my understanding, "if (avctx->error_resilience <= FF_ER_COMPLIANT)"
> would be the right condition...
> 

Heh, well, maybe, if you check current code in mpeg12.c it seems >=
FF_ER_COMPLIANT is always used.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG SAS                                     http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312





More information about the ffmpeg-cvslog mailing list