Browse Source

avcodec: encoder: remove AV_INPUT_BUFFER_MIN_SIZE usage

It's not supported in FFMpeg 8.0 since 60.40.100.

It used to be used with preallocated packet buffers with
the old encode API, but said API is no more and therefore
there is no reason for this to be public any more.
So deprecate it and use an internal replacement
for the encoders using it as an upper bound for the
size of their headers.

(cherry picked from commit dae7faa075)
3.0.x
Steve Lhomme 11 months ago
parent
commit
b7039d8300
  1. 3
      modules/codec/avcodec/avcommon_compat.h
  2. 2
      modules/codec/avcodec/encoder.c

3
modules/codec/avcodec/avcommon_compat.h

@ -75,9 +75,6 @@
#ifndef AV_CODEC_CAP_SMALL_LAST_FRAME
# define AV_CODEC_CAP_SMALL_LAST_FRAME CODEC_CAP_SMALL_LAST_FRAME
#endif
#ifndef AV_INPUT_BUFFER_MIN_SIZE
# define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE
#endif
#ifndef FF_MAX_B_FRAMES
# define FF_MAX_B_FRAMES 16 // FIXME: remove this
#endif

2
modules/codec/avcodec/encoder.c

@ -1052,7 +1052,7 @@ errmsg:
p_sys->i_sample_bytes = (p_enc->fmt_in.audio.i_bitspersample / 8);
p_sys->i_frame_size = p_context->frame_size > 1 ?
p_context->frame_size :
AV_INPUT_BUFFER_MIN_SIZE;
16384; // AV_INPUT_BUFFER_MIN_SIZE
p_sys->i_buffer_out = av_samples_get_buffer_size(NULL,
p_enc->fmt_out.audio.i_channels, p_sys->i_frame_size,
p_sys->p_context->sample_fmt, DEFAULT_ALIGN);

Loading…
Cancel
Save