[ffmpeg] branch master updated. 70a6ad6c74 fftools/ffmpeg_demux: ensure the display_rotation option is honored
The branch, master has been updated via 70a6ad6c743e8f36921755cacff2726825021b8a (commit) from ae149301762b0a7f94400a5aa97b9ae309cb5d6a (commit) - Log ----------------------------------------------------------------- commit 70a6ad6c743e8f36921755cacff2726825021b8a Author: James Almer <jamrial@gmail.com> AuthorDate: Mon Aug 18 12:22:09 2025 -0300 Commit: James Almer <jamrial@gmail.com> CommitDate: Tue Aug 26 11:44:09 2025 -0300 fftools/ffmpeg_demux: ensure the display_rotation option is honored If requested, it should have priotity over any coded value. Fixes ticket #11649. Signed-off-by: James Almer <jamrial@gmail.com> diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 78d8ff6b7d..d2f0017aeb 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -67,6 +67,7 @@ typedef struct DemuxStream { int reinit_filters; int autorotate; int apply_cropping; + int force_display_matrix; int drop_changed; @@ -1183,6 +1184,7 @@ static int add_display_matrix_to_stream(const OptionsContext *o, AVFormatContext *ctx, InputStream *ist) { AVStream *st = ist->st; + DemuxStream *ds = ds_from_ist(ist); AVPacketSideData *sd; double rotation = DBL_MAX; int hflip = -1, vflip = -1; @@ -1217,6 +1219,8 @@ static int add_display_matrix_to_stream(const OptionsContext *o, hflip_set ? hflip : 0, vflip_set ? vflip : 0); + ds->force_display_matrix = 1; + return 0; } @@ -1455,6 +1459,15 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st, AVDictiona av_dict_set_int(&ds->decoder_opts, "apply_cropping", ds->apply_cropping && ds->apply_cropping != CROP_CONTAINER, 0); + if (ds->force_display_matrix) { + char buf[32]; + if (av_dict_get(ds->decoder_opts, "side_data_prefer_packet", NULL, 0)) + buf[0] = ','; + else + buf[0] = '\0'; + av_strlcat(buf, "displaymatrix", sizeof(buf)); + av_dict_set(&ds->decoder_opts, "side_data_prefer_packet", buf, AV_DICT_APPEND); + } /* Attached pics are sparse, therefore we would not want to delay their decoding * till EOF. */ if (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC) ----------------------------------------------------------------------- Summary of changes: fftools/ffmpeg_demux.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) hooks/post-receive --
participants (1)
-
ffmpeg-git@ffmpeg.org