[FFmpeg-devel] [PATCH] avcodec: add AVCODEC_REQUIRED_INPUT_BUFFER_PADDING_SIZE, split FF_INPUT_BUFFER_PADDING_SIZE
Reimar.Doeffinger at gmx.de
Fri Jun 13 17:11:09 CEST 2014
On Fri, Jun 13, 2014 at 03:08:11PM +0200, wm4 wrote:
> > no reply here ?
> > you are more interrested in the complaint than the solution ?
> No, I'm rejecting the very concept of the solution.
> I don't think it's a good idea to make these weird corner cases explicit
> (such as the possibility that the packet buffer might be passed as
> AVFrame to libavfilter). Rather, it's better to pretend this corner
> case doesn't exist by making the amount of required padding always the
> same. Make it explicit that the user has to pad with 0, instead of
> writing something weird about what bits must be set when using mpeg, and
> that nobody really understands in its full consequences. This just
> leads to users guessing wrong.
I don't fully understand this.
This sounds to me like your complaint is with the documentation, and
only the documentation.
We can easily write "allocate all data with av_malloc_padded to easily
get correct behaviour" (assuming I have not missed any corner-cases
it would break).
However that is not the same as _requiring_ everyone to do that,
and we should allow people to use less restrictive solutions for
the cases where it is needed.
More information about the ffmpeg-devel