PR #23389 opened by James Almer (jamrial) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23389 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23389.patch
But only if autorotating is disabled. Fixes issue #23383 >From 324f986e380ec929711ae281478b90d6a6b1e662 Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Sat, 6 Jun 2026 22:00:30 -0300 Subject: [PATCH] fftools/ffmpeg_filter: propagate display matrix side data through the filterchain But only if autorotating is disabled. Fixes issue #23383. Signed-off-by: James Almer <[email protected]> --- fftools/ffmpeg_filter.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 8ea89e2ec2..a934508923 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -2257,8 +2257,7 @@ static int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *fr for (int i = 0; i < frame->nb_side_data; i++) { const AVSideDataDescriptor *desc = av_frame_side_data_desc(frame->side_data[i]->type); - if (!(desc->props & AV_SIDE_DATA_PROP_GLOBAL) || - frame->side_data[i]->type == AV_FRAME_DATA_DISPLAYMATRIX) + if (!(desc->props & AV_SIDE_DATA_PROP_GLOBAL)) continue; ret = av_frame_side_data_clone(&ifp->side_data, @@ -2269,8 +2268,11 @@ static int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *fr } sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX); - if (sd) + if (sd) { memcpy(ifp->displaymatrix, sd->data, sizeof(ifp->displaymatrix)); + if (ifp->opts.flags & IFILTER_FLAG_AUTOROTATE) + av_frame_side_data_remove(&ifp->side_data, &ifp->nb_side_data, AV_FRAME_DATA_DISPLAYMATRIX); + } ifp->displaymatrix_present = !!sd; /* Copy downmix related side data to InputFilterPriv so it may be propagated -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
