[FFmpeg-cvslog] avfilter/af_channelmap: fix error message if FL source channel was missing
Marton Balint
git at videolan.org
Sat Mar 30 23:06:13 EET 2024
ffmpeg | branch: release/6.0 | Marton Balint <cus at passwd.hu> | Mon Mar 18 21:56:58 2024 +0100| [ea2dcb9b3918fb4cbbe2e032c683dc68320145f3] | committer: Marton Balint
avfilter/af_channelmap: fix error message if FL source channel was missing
FL channel ID is 0, so for an unset value we must check for ID < 0.
Regression since 1f96db959c1235bb7079d354e09914a0a2608f62.
Signed-off-by: Marton Balint <cus at passwd.hu>
(cherry picked from commit 9a5627ea9a213c4929020ee8c90bae74788f645c)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ea2dcb9b3918fb4cbbe2e032c683dc68320145f3
---
libavfilter/af_channelmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index eb173d20c4..dd323b992b 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -167,7 +167,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
for (i = 0; i < map_entries; i++) {
int in_ch_idx = -1, out_ch_idx = -1;
- int in_ch = 0, out_ch = 0;
+ int in_ch = -1, out_ch = -1;
static const char err[] = "Failed to parse channel map\n";
switch (mode) {
case MAP_ONE_INT:
@@ -382,7 +382,7 @@ static int channelmap_config_input(AVFilterLink *inlink)
if (m->in_channel_idx < 0 || m->in_channel_idx >= nb_channels) {
av_channel_layout_describe(&inlink->ch_layout, layout_name, sizeof(layout_name));
- if (m->in_channel) {
+ if (m->in_channel >= 0) {
av_channel_name(channel_name, sizeof(channel_name), m->in_channel);
av_log(ctx, AV_LOG_ERROR,
"input channel '%s' not available from input layout '%s'\n",
More information about the ffmpeg-cvslog
mailing list