From: Marton Balint <cus@passwd.hu>
To: ffmpeg-devel@ffmpeg.org
Cc: Marton Balint <cus@passwd.hu>
Subject: [FFmpeg-devel] [PATCH 2/6] avfilter/af_channelmap: fix mapping if in_channel was a string but out_channel was not specified
Date: Tue, 19 Mar 2024 22:15:00 +0100
Message-ID: <20240319211504.8342-2-cus@passwd.hu> (raw)
In-Reply-To: <20240319211504.8342-1-cus@passwd.hu>
In this case in_channel_idx was never set and the default 0 was used.
Suprisingly no one noticed that the respective fate test output was wrong.
Signed-off-by: Marton Balint <cus@passwd.hu>
---
libavfilter/af_channelmap.c | 2 +-
tests/fate/filter-audio.mak | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index d13dcc317d..35dc4c4618 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -342,7 +342,7 @@ static int channelmap_config_input(AVFilterLink *inlink)
for (i = 0; i < s->nch; i++) {
struct ChannelMap *m = &s->map[i];
- if (s->mode == MAP_PAIR_STR_INT || s->mode == MAP_PAIR_STR_STR) {
+ if (s->mode == MAP_PAIR_STR_INT || s->mode == MAP_PAIR_STR_STR || s->mode == MAP_ONE_STR) {
m->in_channel_idx = av_channel_layout_index_from_channel(
&inlink->ch_layout, m->in_channel);
}
diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index 308969c4ac..88299a932f 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -302,7 +302,7 @@ fate-filter-channelmap-one-str: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.w
fate-filter-channelmap-one-str: tests/data/asynth-44100-2.wav
fate-filter-channelmap-one-str: CMD = md5 -auto_conversion_filters -i $(SRC) -/filter_complex $(TARGET_PATH)/tests/data/filtergraphs/channelmap_one_str -f wav -fflags +bitexact
fate-filter-channelmap-one-str: CMP = oneline
-fate-filter-channelmap-one-str: REF = 0ea3052e482c95d5d3bd9da6dac1b5fa
+fate-filter-channelmap-one-str: REF = e18791f65ce5861e130b2c3e472ab90a
FATE_AFILTER-$(call FILTERDEMDECENCMUX, CHANNELMAP ARESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_FILTER_CHANNELMAP)
--
2.35.3
_______________________________________________
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".
next prev parent reply other threads:[~2024-03-19 21:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 21:14 [FFmpeg-devel] [PATCH 1/6] avfilter/af_channelmap: fix error message if FL source channel was missing Marton Balint
2024-03-19 21:15 ` Marton Balint [this message]
2024-03-23 12:26 ` [FFmpeg-devel] [PATCH 2/6] avfilter/af_channelmap: fix mapping if in_channel was a string but out_channel was not specified Paul B Mahol
2024-03-19 21:15 ` [FFmpeg-devel] [PATCH 3/6] avfilter/af_channelmap: disallow channel index 64 Marton Balint
2024-03-19 21:15 ` [FFmpeg-devel] [PATCH 4/6] avfilter/af_channelmap: factorize checking indexes against a channel layout Marton Balint
2024-03-19 21:15 ` [FFmpeg-devel] [PATCH 5/6] avfilter/af_channelmap: add some additional checks for the mappings Marton Balint
2024-03-19 21:15 ` [FFmpeg-devel] [PATCH 6/6] doc/filters: extend af_channelmap documentation Marton Balint
2024-03-23 11:18 ` [FFmpeg-devel] [PATCH 1/6] avfilter/af_channelmap: fix error message if FL source channel was missing Marton Balint
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=20240319211504.8342-2-cus@passwd.hu \
--to=cus@passwd.hu \
--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