mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avfilter/af_aresample: fix layout comparison when applying downmix coeffs
out_layout at this point is a zeroed struct, and even after being filled below in the code it's ensured it will be the same as outlink->side_data. The actual check should be between inlink and outlink layouts. If they differ, then swr will do remixing and as such the downmix info side data will no longer be valid for any filter or encoder down the chain. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -177,7 +177,7 @@ static int config_output(AVFilterLink *outlink)
|
||||
av_opt_set_double(aresample->swr, "lfe_mix_level", di->lfe_mix_level, 0);
|
||||
av_opt_set_int(aresample->swr, "matrix_encoding", matrix_encoding, 0);
|
||||
|
||||
if (av_channel_layout_compare(&outlink->ch_layout, &out_layout))
|
||||
if (av_channel_layout_compare(&outlink->ch_layout, &inlink->ch_layout))
|
||||
av_frame_side_data_remove(&outlink->side_data, &outlink->nb_side_data,
|
||||
AV_FRAME_DATA_DOWNMIX_INFO);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user