[FFmpeg-devel] [PATCH] ffmdec: sanitize codec parameters

Carl Eugen Hoyos ceffmpeg at gmail.com
Sun Nov 20 22:02:16 EET 2016


2016-11-20 20:40 GMT+01:00 Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>:
> On 20.11.2016 13:42, Carl Eugen Hoyos wrote:
>> 2016-11-19 17:30 GMT+01:00 Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>:
>>
>>> A hard failure is unnecessary and Carl Eugen [1] and Hendrik [2]
>>> convinced me that it should be avoided.
>>
>> I believe that ffm should (or at least can) indeed be treated differently
>> from all other containers.
>
> OK, ffm is a special case, but I'm also interested in the general case.
>
> Currently many demuxers silently accept wrong (i.e. negative) values
> for channels, bit_rate, block_align and so on. I'd like to fix that,
> so the question is now, how?
>
> There are a few possibilities:
> a) error out for negative values and also for zero

Only if -fstrict strict was set.

> b) error out for negative values, silently accept zero

Only if -fstrict strict was set.

> c) warn for negative values and also for zero
> d) warn for negative values, silently accept zero

I obviously cannot stop you if you feel this should
be done, but note that users will report regressions
"warnings are shown for playable files".

> e) something else

Broken files exist and FFmpeg should play them if
reasonable.

Carl Eugen


More information about the ffmpeg-devel mailing list