[Ffmpeg-devel] Wavpack decoded packet size?
Fri Oct 13 06:51:16 CEST 2006
On Fri, 2006-10-13 at 07:23 +0300, Kostya wrote:
> > seconded, a decoder should not depend on a demuxer doing sanity checks
> Maybe yes, but:
> a) what decoders do actually check for overflow (I found only vorbis and raw PCM)
Many formats have natural packet size limits below
> b) external demuxer may pass greater buffer to decoder and everything will be fine
But can only do that safely if it has wavpack-specific code to check the
size of the frames. And if you think external demuxer+internal decoder
is an argument against checking the size in the decoder, then why did
you put the check in the demuxer? Now you can't use internal demuxer
+external decoder with big packets. Is there a reason why having the
check in the demuxer is better than having it in the decoder? There's no
reason the demuxer couldn't return arbitrarily big packets as long as
they won't cause a buffer overflow in the decoder.
> this leads us to a long-discussed questions of API change (for audio, palette, etc.)
The API could probably be improved, but as long as it isn't violating it
in a way that can cause buffer overflows is worse.
More information about the ffmpeg-devel