[FFmpeg-cvslog] r12434 - trunk/libavcodec/mpeg12.c
Baptiste Coudurier
baptiste.coudurier
Fri Mar 14 00:19:46 CET 2008
Baptiste Coudurier wrote:
> Hi,
>
> Ivan Kalvachev wrote:
>> On Fri, Mar 14, 2008 at 12:08 AM, Baptiste Coudurier
>> <baptiste.coudurier at smartjog.com> wrote:
>>> Hi,
>>>
>>>
>>> M?ns Rullg?rd wrote:
>>> > bcoudurier <subversion at mplayerhq.hu> writes:
>>> >
>>> >> Author: bcoudurier
>>> >> Date: Thu Mar 13 19:26:53 2008
>>> >> New Revision: 12434
>>> >>
>>> >> Log:
>>> >> do not fail badly if aspect ratio is 0/forbidden, fix issue 369
>>> >>
>>> >> Modified:
>>> >> trunk/libavcodec/mpeg12.c
>>> >>
>>> >> Modified: trunk/libavcodec/mpeg12.c
>>> >> ==============================================================================
>>> >> --- trunk/libavcodec/mpeg12.c (original)
>>> >> +++ trunk/libavcodec/mpeg12.c Thu Mar 13 19:26:53 2008
>>> >> @@ -1970,8 +1970,6 @@ 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)
>>> >> - return -1;
>>> >
>>> > IMHO a warning should be printed in this case. Users have right to
>>> > know (or deserve to be annoyed).
>>> >
>>>
>>> Yes, what about this ?
>> Please make this "broken" behavior to be bound to
>> "error_resilience" or "strict_std_compliance" .
>
> I see no advantage in it, this does not slow code down, and cannot
> produce start code emulation since previous and next values are checked.
> Im against it.
>
Attached patch should not make it fail in the default case, but will if
user wants strict compliance, and log a warning in all cases. Ok for
everyone ?
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aspect_ratio_warn.patch
Type: text/x-diff
Size: 649 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20080314/e115082c/attachment.patch>
More information about the ffmpeg-cvslog
mailing list