mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-07-18 01:13:29 +00:00
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 <jamrial@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user