ffmpeg | branch: master | Paul B Mahol <[email protected]> | Fri Nov 18 12:56:10 2022 +0100| [3e6816514c5a0f56b7028c429bd8a371cac7f8e3] | committer: Paul B Mahol
avfilter/af_surround: fix regression with channel i/o gain > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e6816514c5a0f56b7028c429bd8a371cac7f8e3 --- libavfilter/af_surround.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c index 9a589645ca..ed1bb3f9af 100644 --- a/libavfilter/af_surround.c +++ b/libavfilter/af_surround.c @@ -196,30 +196,30 @@ static void set_input_levels(AVFilterContext *ctx) { AudioSurroundContext *s = ctx->priv; + for (int ch = 0; ch < s->nb_in_channels && s->level_in >= 0.f; ch++) + s->input_levels[ch] = s->level_in; + s->level_in = -1.f; + for (int n = 0; n < SC_NB; n++) { const int ch = av_channel_layout_index_from_channel(&s->in_ch_layout, ch_map[n]); if (ch >= 0) s->input_levels[ch] = s->f_i[n]; } - - for (int ch = 0; ch < s->nb_in_channels && s->level_in >= 0.f; ch++) - s->input_levels[ch] = s->level_in; - s->level_in = -1.f; } static void set_output_levels(AVFilterContext *ctx) { AudioSurroundContext *s = ctx->priv; + for (int ch = 0; ch < s->nb_out_channels && s->level_out >= 0.f; ch++) + s->output_levels[ch] = s->level_out; + s->level_out = -1.f; + for (int n = 0; n < SC_NB; n++) { const int ch = av_channel_layout_index_from_channel(&s->out_ch_layout, ch_map[n]); if (ch >= 0) s->output_levels[ch] = s->f_o[n]; } - - for (int ch = 0; ch < s->nb_out_channels && s->level_out >= 0.f; ch++) - s->output_levels[ch] = s->level_out; - s->level_out = -1.f; } static int config_input(AVFilterLink *inlink) _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
