FFmpeg: Remove deprecated variable (fixes ffmpeg 8 compilation)
We needed to remove `AV_INPUT_BUFFER_MIN_SIZE` as ffmpeg8 has removed it: [Changelog](4811518143:/doc/APIchanges#l468
)
Pull Request: https://projects.blender.org/blender/blender/pulls/145183
This commit is contained in:
committed by
Sebastian Parborg
parent
fa3355c505
commit
f5f3013113
@@ -334,12 +334,12 @@ AVStream *alloc_audio_stream(MovieWriter *context,
|
||||
c->time_base.num = 1;
|
||||
c->time_base.den = c->sample_rate;
|
||||
|
||||
if (c->frame_size == 0) {
|
||||
/* Used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
|
||||
* not sure if that is needed anymore, so let's try out if there are any
|
||||
* complaints regarding some FFMPEG versions users might have. */
|
||||
context->audio_input_samples = AV_INPUT_BUFFER_MIN_SIZE * 8 / c->bits_per_coded_sample /
|
||||
audio_channels;
|
||||
if (c->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) {
|
||||
/* If the audio format has a variable frame size, default to 1024.
|
||||
* This is because we won't try to encode any variable frame size.
|
||||
* 1024 seems to be a good compromize between size and speed.
|
||||
*/
|
||||
context->audio_input_samples = 1024;
|
||||
}
|
||||
else {
|
||||
context->audio_input_samples = c->frame_size;
|
||||
|
||||
Reference in New Issue
Block a user