Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Paul B Mahol <onemda@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] avfilter: fix af_pan regression
Date: Sat, 4 Feb 2023 21:48:38 +0100
Message-ID: <CAPYw7P6bbLiSj_bUGiv_GWk9sZbJkBo1yGKFAhdHDKaUWuRg3g@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 16 bytes --]

Patch attached.

[-- Attachment #2: 0001-avfilter-af_pan-fix-regression-introduced-with-switc.patch --]
[-- Type: text/x-patch, Size: 1286 bytes --]

From b53fa290876af0f540a99f733193f270103bf8ad Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Sat, 4 Feb 2023 21:46:15 +0100
Subject: [PATCH] avfilter/af_pan: fix regression introduced with switch to new
 channel layout API

Fixes #10168

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavfilter/af_pan.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index 067f646805..504e0fb5d3 100644
--- a/libavfilter/af_pan.c
+++ b/libavfilter/af_pan.c
@@ -313,6 +313,7 @@ static int config_props(AVFilterLink *link)
             pan->channel_map[i] = ch_id;
         }
 
+        av_opt_set_chlayout(pan->swr, "ichl", &pan->out_channel_layout, 0);
         av_opt_set_int(pan->swr, "uch", pan->nb_output_channels, 0);
         swr_set_channel_mapping(pan->swr, pan->channel_map);
     } else {
@@ -333,6 +334,8 @@ static int config_props(AVFilterLink *link)
             for (j = 0; j < link->ch_layout.nb_channels; j++)
                 pan->gain[i][j] /= t;
         }
+        av_opt_set_chlayout(pan->swr, "ichl", &link->ch_layout, 0);
+        av_opt_set_chlayout(pan->swr, "ochl", &pan->out_channel_layout, 0);
         swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]);
     }
 
-- 
2.39.1


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

             reply	other threads:[~2023-02-04 20:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04 20:48 Paul B Mahol [this message]
2023-02-05 19:58 ` Michael Niedermayer
2023-02-05 20:37   ` Paul B Mahol
2023-02-07 17:04     ` Paul B Mahol

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPYw7P6bbLiSj_bUGiv_GWk9sZbJkBo1yGKFAhdHDKaUWuRg3g@mail.gmail.com \
    --to=onemda@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git