[FFmpeg-devel] [PATCH] swresample/swresample: fix assert failure
James Almer
jamrial at gmail.com
Fri Sep 9 14:58:00 EEST 2022
I sent an alternative approach last night.
On 9/9/2022 3:20 PM, Zhao Zhili wrote:
> From: Zhao Zhili <zhilizhao at tencent.com>
>
> Fix #9908. Regression since 8a5896ec1f6.
>
> Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
> ---
> libswresample/swresample.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/libswresample/swresample.c b/libswresample/swresample.c
> index 6f04d130d3..624309c2a0 100644
> --- a/libswresample/swresample.c
> +++ b/libswresample/swresample.c
> @@ -265,12 +265,14 @@ av_cold int swr_init(struct SwrContext *s){
> av_channel_layout_describe(&s->in_ch_layout, l1, sizeof(l1));
> av_log(s, AV_LOG_WARNING, "Input channel layout \"%s\" is invalid or unsupported.\n", l1);
> av_channel_layout_uninit(&s->in_ch_layout);
> + s->in.ch_count = 0;
> }
>
> if (!av_channel_layout_check(&s->out_ch_layout) || s->out_ch_layout.nb_channels > SWR_CH_MAX) {
> av_channel_layout_describe(&s->out_ch_layout, l2, sizeof(l2));
> av_log(s, AV_LOG_WARNING, "Output channel layout \"%s\" is invalid or unsupported.\n", l2);
> av_channel_layout_uninit(&s->out_ch_layout);
> + s->out.ch_count = 0;
> }
>
> switch(s->engine){
More information about the ffmpeg-devel
mailing list