From 754947a0590cf6e0aba73eefb5bcf9b78e30497c Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Thu, 14 Nov 2024 10:46:18 +0100 Subject: [PATCH] vdisp/file: avoid deprecated AVCodec::sample_fmts see the also the commit 8b94de58 (2024-11-12) --- src/video_display/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_display/file.c b/src/video_display/file.c index b37535651..a80d50b6d 100644 --- a/src/video_display/file.c +++ b/src/video_display/file.c @@ -496,7 +496,8 @@ configure_audio(struct state_file *s, struct audio_desc aud_desc, s->audio.enc = avcodec_alloc_context3(codec); s->audio.enc->sample_fmt = s->is_nut ? audio_bps_to_av_sample_fmt(aud_desc.bps, false) - : select_sample_format(s->audio.enc->codec->sample_fmts); + : select_sample_format( + avc_get_supported_sample_fmts(s->audio.enc, NULL)); aud_ctx_set_ch_layout(s->audio.enc, aud_desc.ch_count, s->is_nut); s->audio.enc->sample_rate = aud_desc.sample_rate; s->audio.st->time_base = (AVRational){ 1, aud_desc.sample_rate };