[FFmpeg-devel] [PATCH] do not fail if aspect ratio is forbidden in mpeg-2

Baptiste Coudurier baptiste.coudurier
Fri Mar 14 11:48:56 CET 2008


M?ns Rullg?rd wrote:
> Baptiste Coudurier wrote:
>> Hi,
>>
>> Michael Niedermayer wrote:
>>> On Thu, Mar 13, 2008 at 10:08:49PM +0200, Ivan Kalvachev wrote:
>>>> On Thu, Mar 13, 2008 at 8:27 PM, Baptiste Coudurier
>>>> <baptiste.coudurier at smartjog.com> wrote:
>>>>> Michael Niedermayer wrote:
>>>>>  > On Thu, Mar 13, 2008 at 07:09:51PM +0100, Baptiste Coudurier wrote:
>>>>>  >> Hi,
>>>>>  >>
>>>>>  >> $subject.
>>>>>  >>
>>>>>  >> Yes, value 0 is forbidden in the specs (ISO 13818-2), however IMHO it is
>>>>>  >> a bit harsh to fail badly (libmpeg2 does not fail)
>>>>>  >>
>>>>>  >> This fixes issue 369.
>>>>>  >
>>>>>  > ok
>>>>>  >
>>>>>
>>>>>  Applied.
>>>> That commit was quick.
>>>>
>>>> However I'm not happy with it. The value of zero is not reserved, it
>>>> is forbidden. In theory forbidden values are values that could lead to
>>>> startcode emulation.
>>>>
>>>> The sample doesn't seem to contain another sequence header so there is
>>>> no way to check if this sample is accidentally or systematically
>>>> broken.
>>>>
>>>> I guess that libmpeg2 accepting broken codes is bug, that library is
>>>> known to have error resilience issues.
>>>>
>>>> Anyway, as Michael accepted it so I won't request this to be reverted.
>>>> I'd however request this "broken" behavior to be bound to
>>>> "error_resilience" or "strict_std_compliance" .
>>> Iam fine with that, we could also add a warning so the user knows that
>>> the file is not ok and why.
>>>
>> Added a message, and code fail is error_resilience is >= FF_ER_COMPLIANT.
> 
> I think that's backwards.  Higher error_resilience values mean lavc should
> try harder to decode damaged streams.  The test should be <= FF_ER_COMPLIANT.
> 

Well, maybe, Im not sure, a lot of checks in mpeg12.c and h263.c must be
changed then since return -1 is done when >= FF_ER_COMPLIANT.

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





More information about the ffmpeg-devel mailing list