https://bugs.gentoo.org/985391 https://github.com/alsa-project/alsa-plugins/issues/64 https://github.com/alsa-project/alsa-plugins/commit/eef274dbc8 --- a/a52/pcm_a52.c +++ b/a52/pcm_a52.c @@ -1203,5 +1203,20 @@ #endif #ifdef USE_AVCODEC_FRAME +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100) + { + const enum AVSampleFormat *sample_fmts = NULL; + err = avcodec_get_supported_config(NULL, rec->codec, + AV_CODEC_CONFIG_SAMPLE_FORMAT, + 0, (const void **)&sample_fmts, + NULL); + if (err < 0 || !sample_fmts) { + err = -EINVAL; + goto error; + } + rec->av_format = sample_fmts[0]; + } +#else rec->av_format = rec->codec->sample_fmts[0]; +#endif rec->is_planar = av_sample_fmt_is_planar(rec->av_format); #else