[FFmpeg-devel] [PATCH] avfilter/avfilter: Don't use AVFrame.channel_layout

James Almer jamrial at gmail.com
Mon Sep 5 15:32:00 EEST 2022


On 9/4/2022 8:30 PM, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>   libavfilter/avfilter.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
> index 965f5d0f63..6740339808 100644
> --- a/libavfilter/avfilter.c
> +++ b/libavfilter/avfilter.c
> @@ -62,7 +62,7 @@ static void tlog_ref(void *ctx, AVFrame *ref, int end)
>       }
>       if (ref->nb_samples) {
>           ff_tlog(ctx, " cl:%"PRId64"d n:%d r:%d",
> -                ref->channel_layout,
> +                ref->ch_layout.order == AV_CHANNEL_ORDER_NATIVE ? ref->ch_layout.u.mask : 0,

Should be ok, but i expect that eventually filters will support and 
start propagating custom layouts (after the old API is gone), so maybe 
using the layout name helpers is a better idea.

>                   ref->nb_samples,
>                   ref->sample_rate);
>       }


More information about the ffmpeg-devel mailing list