This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit b662613b63e902e3978bc3977e4ad3ccb738110f Author: James Almer <[email protected]> AuthorDate: Thu Jun 4 14:46:07 2026 -0300 Commit: James Almer <[email protected]> CommitDate: Sat Jul 11 19:32:17 2026 -0300 avfilter/af_aresample: also look for downmix matrix side data Signed-off-by: James Almer <[email protected]> --- libavfilter/af_aresample.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index 15b14b27f7..8e7f5bfc56 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -145,6 +145,30 @@ static int config_output(AVFilterLink *outlink) if (ret < 0) return ret; + sd = av_frame_side_data_get(inlink->side_data, inlink->nb_side_data, + AV_FRAME_DATA_DOWNMIX_MATRIX); + if (sd) { + const AVDownmixMatrix *dm = (AVDownmixMatrix *)sd->data; + + if (inlink->ch_layout.nb_channels == dm->in_ch_count && + !av_channel_layout_compare(&outlink->ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO)) { + swr_set_matrix(aresample->swr, + (double *)((uint8_t *)dm + dm->coeffs_offset), + dm->in_ch_count); + + switch (dm->downmix_type) { + case AV_DOWNMIX_TYPE_LTRT: + matrix_encoding = AV_MATRIX_ENCODING_DOLBY; + break; + case AV_DOWNMIX_TYPE_DPLII: + matrix_encoding = AV_MATRIX_ENCODING_DPLII; + break; + default: + break; + } + } + } + sd = av_frame_side_data_get(inlink->side_data, inlink->nb_side_data, AV_FRAME_DATA_DOWNMIX_INFO); if (sd) { _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
