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

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Sun Nov 20 21:40:24 EET 2016


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
b) error out for negative values, silently accept zero
c) warn for negative values and also for zero
d) warn for negative values, silently accept zero
e) something else

Is there a consensus on which way is best?

Best regards,
Andreas


More information about the ffmpeg-devel mailing list