Skip to content

Commit

Permalink
Fix setting avfilter channel count, similar to what was done in link_…
Browse files Browse the repository at this point in the history
…avfilter
  • Loading branch information
j-b-m authored and ddennedy committed Sep 24, 2024
1 parent 6dfe01e commit 615aac5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/modules/avformat/filter_avfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,6 @@ static void init_audio_filtergraph(mlt_filter filter,
mlt_log_error(filter, "Cannot set sink sample rates\n");
goto fail;
}
ret = av_opt_set_int_list(pdata->avbuffsink_ctx,
"channel_counts",
channel_counts,
-1,
AV_OPT_SEARCH_CHILDREN);
if (ret < 0) {
mlt_log_error(filter, "Cannot set sink channel counts\n");
goto fail;
}
#if HAVE_FFMPEG_CH_LAYOUT
ret = av_opt_set(pdata->avbuffsink_ctx,
"ch_layouts",
Expand All @@ -307,6 +298,15 @@ static void init_audio_filtergraph(mlt_filter filter,
goto fail;
}
#else
ret = av_opt_set_int_list(pdata->avbuffsink_ctx,
"channel_counts",
channel_counts,
-1,
AV_OPT_SEARCH_CHILDREN);
if (ret < 0) {
mlt_log_error(filter, "Cannot set sink channel counts\n");
goto fail;
}
ret = av_opt_set_int_list(pdata->avbuffsink_ctx,
"channel_layouts",
channel_layouts,
Expand Down

0 comments on commit 615aac5

Please sign in to comment.