[FFmpeg-devel] [PATCH 2/3] wavpackenc: report too small buffer

Christophe Gisquet christophe.gisquet at gmail.com
Tue Aug 19 18:28:11 CEST 2014


Hi,

2014-08-19 16:20 GMT+02:00 Nicolas George <george at nsup.org>:
> IMHO, the correct error depends on how sure you are that a buffer too small
> SHOULD not happen.
>
> If you are very sure, then av_assert0().

That would be it: I'm sure that, if the condition occurs and the
packet is written anyway, the file will be incorrect.

But that's if the packet is written. I would think this is a
recoverable issue/possibly with different outcomes, and just returning
the failure is good enough.

Reallocating is an alternate good solution, but I've already had my
share of that with prores. So I would prefer the assert then.

-- 
Christophe


More information about the ffmpeg-devel mailing list