[FFmpeg-devel] [PATCH] avcodec: increase FF_INPUT_BUFFER_PADDING_SIZE to 32
nfxjfg at googlemail.com
Thu Jun 12 19:04:57 CEST 2014
On Thu, 12 Jun 2014 08:42:13 +0200
Christophe Gisquet <christophe.gisquet at gmail.com> wrote:
> 2014-06-11 21:29 GMT+02:00 Michael Niedermayer <michaelni at gmx.at>:
> > -#define FF_INPUT_BUFFER_PADDING_SIZE 16
> > +#define FF_INPUT_BUFFER_PADDING_SIZE 32
> So, following the discussion on how API users may be affected by this
> change, does that need an API bump?
> Regarding the value, I see it bumped to 8 to 64 and reverted in March
> 2010 without much comment (reverting accidental commit?), bumped from
> 8 to 16 in June 2011 (no API bump) for an equivalent reason to the
> current bump.
API issues weren't taken so seriously in the past. Ensuring API and ABI
stability is a relatively new thing.
I would argue that this is a major change, because the input padding is
the size of data lavc will access outside of the buffer bounds. So if a
program is compiled to pad only 16 bytes, and then lavc is updated,
lavc will suddenly do out of bounds accesses.
But judging from the commit message, the size was bumped to paint over
another bug (existing code reading past the 16 bytes padding). That's
an interesting way to fix bugs.
More information about the ffmpeg-devel