[FFmpeg-devel] [PATCH] do not fail if aspect ratio is forbidden in mpeg-2
Måns Rullgård
mans
Fri Mar 14 11:45:27 CET 2008
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.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list