This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 88f7fd9ec5250d8e35c789d1eb0603ac80e8c547 Author: cuptu <[email protected]> AuthorDate: Sun Sep 13 23:24:35 2026 +0800 Commit: James Almer <[email protected]> CommitDate: Fri Sep 18 16:56:21 2026 +0000 fftools/ffprobe: require explicit selection for program streams Shared stream entries implicitly enable programs as well as stream groups. Require explicit selection for the program streams subtree too, avoiding duplicate streams in MPEG-TS output and empty program sections in JSON. Keep explicit program selection and stream field filtering working. Add tests for -show_programs and program_stream, and update the MOV and MPEG-TS references affected by the removal of implicit program output. Signed-off-by: cuptu <[email protected]> --- doc/ffprobe.texi | 11 ++++++----- fftools/ffprobe.c | 5 +++-- tests/fate/mpegts.mak | 10 ++++++++++ tests/ref/fate/mov-mp4-disposition-mpegts-remux | 3 --- tests/ref/fate/mov-mp4-ttml-dfxp | 3 --- tests/ref/fate/mov-mp4-ttml-stpp | 3 --- tests/ref/fate/mpegts-lcevc-h264-dual-track | 12 ------------ tests/ref/fate/mpegts-lcevc-hevc-dual-track | 12 ------------ tests/ref/fate/mpegts-lcevc-vvc-dual-track | 12 ------------ tests/ref/fate/mpegts-probe-latm | 8 -------- tests/ref/fate/mpegts-probe-pmt-merge | 17 ----------------- tests/ref/fate/mpegts-probe-program | 5 ----- ...mpegts-probe-program => mpegts-probe-program-stream} | 3 --- .../{mpegts-probe-latm => mpegts-probe-show-program} | 0 14 files changed, 19 insertions(+), 85 deletions(-) diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi index 9b95b82938..254de54f0b 100644 --- a/doc/ffprobe.texi +++ b/doc/ffprobe.texi @@ -196,11 +196,12 @@ sections: stream_tags=title @end example -Selecting @code{stream} or @code{streams} does not by itself enable stream -group output. To also show streams within groups, use -@code{-show_stream_groups} or select their unique section name, for example -@code{-show_entries stream_group_stream=index}. The shared names still -select fields within stream groups when group output is enabled. +Selecting @code{stream} or @code{streams} does not by itself enable program or +stream group output. To also show streams within programs or groups, use +@code{-show_programs}, @code{-show_stream_groups}, or select their unique +section name, for example @code{-show_entries program_stream=index} or +@code{-show_entries stream_group_stream=index}. The shared names still select +fields within programs and stream groups when their output is enabled. @item -show_packets Show information about each packet contained in the input multimedia diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 8d65586742..f0148bcf84 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3349,8 +3349,9 @@ static inline int check_section_show_entries(int section_id, int require_explici { const EntrySelection *selection = &selected_entries[section_id]; - /* Selecting a shared stream section must not implicitly enable groups. */ - if (section_id == SECTION_ID_STREAM_GROUP_STREAMS) + /* A shared stream section must not implicitly enable programs or groups. */ + if (section_id == SECTION_ID_PROGRAM_STREAMS || + section_id == SECTION_ID_STREAM_GROUP_STREAMS) require_explicit = 1; if ((!require_explicit || selection->explicitly_selected) && diff --git a/tests/fate/mpegts.mak b/tests/fate/mpegts.mak index 65aab40d69..5943571de9 100644 --- a/tests/fate/mpegts.mak +++ b/tests/fate/mpegts.mak @@ -9,6 +9,16 @@ FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, LOAS_DEMUXER) += fate-mpegts-prob fate-mpegts-probe-latm: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts fate-mpegts-probe-latm: CMD = run $(PROBE_CODEC_NAME_COMMAND) -i "$(SRC)" +FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, LOAS_DEMUXER) += fate-mpegts-probe-show-program +fate-mpegts-probe-show-program: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts +fate-mpegts-probe-show-program: CMD = run $(PROBE_CODEC_NAME_COMMAND) -show_programs \ + -show_entries program=:program_tags=:program_stream_disposition=:program_stream_tags=:stream=codec_name -i "$(SRC)" + +FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, LOAS_DEMUXER) += fate-mpegts-probe-program-stream +fate-mpegts-probe-program-stream: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts +fate-mpegts-probe-program-stream: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -v 0 -bitexact \ + -select_streams p:769:v:0 -show_entries program_stream=codec_name -i "$(SRC)" + FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, LOAS_DEMUXER) += fate-mpegts-probe-program fate-mpegts-probe-program: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts diff --git a/tests/ref/fate/mov-mp4-disposition-mpegts-remux b/tests/ref/fate/mov-mp4-disposition-mpegts-remux index 7107bf4497..4bf25fa38d 100644 --- a/tests/ref/fate/mov-mp4-disposition-mpegts-remux +++ b/tests/ref/fate/mov-mp4-disposition-mpegts-remux @@ -17,9 +17,6 @@ 0, 4608, 4608, 1536, 690, 0xa2714bf3 1, 4608, 4608, 1536, 626, 0x09f4382f { - "programs": [ - - ], "streams": [ { "index": 0, diff --git a/tests/ref/fate/mov-mp4-ttml-dfxp b/tests/ref/fate/mov-mp4-ttml-dfxp index 2d60f3d964..865ffee105 100644 --- a/tests/ref/fate/mov-mp4-ttml-dfxp +++ b/tests/ref/fate/mov-mp4-ttml-dfxp @@ -19,9 +19,6 @@ "pos": "44", "flags": "K__" } - ], - "programs": [ - ], "streams": [ { diff --git a/tests/ref/fate/mov-mp4-ttml-stpp b/tests/ref/fate/mov-mp4-ttml-stpp index 0a8e423449..200a477df8 100644 --- a/tests/ref/fate/mov-mp4-ttml-stpp +++ b/tests/ref/fate/mov-mp4-ttml-stpp @@ -20,9 +20,6 @@ cbd2c7ff864a663b0d893deac5a0caec *tests/data/fate/mov-mp4-ttml-stpp.mp4 "pos": "44", "flags": "K__" } - ], - "programs": [ - ], "streams": [ { diff --git a/tests/ref/fate/mpegts-lcevc-h264-dual-track b/tests/ref/fate/mpegts-lcevc-h264-dual-track index 73c6c7374a..4a31860daa 100644 --- a/tests/ref/fate/mpegts-lcevc-h264-dual-track +++ b/tests/ref/fate/mpegts-lcevc-h264-dual-track @@ -34,18 +34,6 @@ 0, 75000, 81000, 3000, 175, 0x17244a4e, F=0x0, S=1, MPEGTS Stream ID, 1, 0x00e000e0 0, 78000, 78000, 3000, 131, 0x1c0d2a8a, F=0x0, S=1, MPEGTS Stream ID, 1, 0x00e000e0 0, 81000, 84000, 3000, 391, 0xe4e0b1f6, F=0x0, S=1, MPEGTS Stream ID, 1, 0x00e000e0 -[PROGRAM] -[STREAM] -index=0 -codec_name=h264 -id=0x100 -[/STREAM] -[STREAM] -index=1 -codec_name=lcevc -id=0x101 -[/STREAM] -[/PROGRAM] [STREAM_GROUP] index=0 id=0xce diff --git a/tests/ref/fate/mpegts-lcevc-hevc-dual-track b/tests/ref/fate/mpegts-lcevc-hevc-dual-track index 02c673c6b4..bd871b4d9d 100644 --- a/tests/ref/fate/mpegts-lcevc-hevc-dual-track +++ b/tests/ref/fate/mpegts-lcevc-hevc-dual-track @@ -34,18 +34,6 @@ 0, 75000, 75000, 3000, 139, 0xb0f93bbf, F=0x0, S=1, MPEGTS Stream ID, 1, 0x00e000e0 0, 78000, 78000, 3000, 103, 0x303b27b7, F=0x0, S=1, MPEGTS Stream ID, 1, 0x00e000e0 0, 81000, 84000, 3000, 136, 0x1f1a3853, F=0x0, S=1, MPEGTS Stream ID, 1, 0x00e000e0 -[PROGRAM] -[STREAM] -index=0 -codec_name=hevc -id=0x100 -[/STREAM] -[STREAM] -index=1 -codec_name=lcevc -id=0x101 -[/STREAM] -[/PROGRAM] [STREAM_GROUP] index=0 id=0xce diff --git a/tests/ref/fate/mpegts-lcevc-vvc-dual-track b/tests/ref/fate/mpegts-lcevc-vvc-dual-track index 67b9353515..2b103730cf 100644 --- a/tests/ref/fate/mpegts-lcevc-vvc-dual-track +++ b/tests/ref/fate/mpegts-lcevc-vvc-dual-track @@ -34,18 +34,6 @@ 0, 72000, 75000, 3000, 169, 0xa24f49ea, F=0x0, S=1, MPEGTS Stream ID, 1, 0x00e000e0 0, 75000, 81000, 3000, 64, 0xa66c143b, F=0x0, S=1, MPEGTS Stream ID, 1, 0x00e000e0 0, 78000, 84000, 3000, 184, 0xc61e46d9, F=0x0, S=1, MPEGTS Stream ID, 1, 0x00e000e0 -[PROGRAM] -[STREAM] -index=0 -codec_name=vvc -id=0x100 -[/STREAM] -[STREAM] -index=1 -codec_name=lcevc -id=0x101 -[/STREAM] -[/PROGRAM] [STREAM_GROUP] index=0 id=0xce diff --git a/tests/ref/fate/mpegts-probe-latm b/tests/ref/fate/mpegts-probe-latm index 6fa9b623f3..4e779506dc 100644 --- a/tests/ref/fate/mpegts-probe-latm +++ b/tests/ref/fate/mpegts-probe-latm @@ -1,11 +1,3 @@ -[PROGRAM] -[STREAM] -codec_name=hevc -[/STREAM] -[STREAM] -codec_name=aac_latm -[/STREAM] -[/PROGRAM] [STREAM] codec_name=hevc [/STREAM] diff --git a/tests/ref/fate/mpegts-probe-pmt-merge b/tests/ref/fate/mpegts-probe-pmt-merge index 6e424af5d2..0bb444b924 100644 --- a/tests/ref/fate/mpegts-probe-pmt-merge +++ b/tests/ref/fate/mpegts-probe-pmt-merge @@ -1,20 +1,3 @@ -[PROGRAM] -[STREAM] -codec_name=ac3 -[/STREAM] -[STREAM] -codec_name=ac3 -[/STREAM] -[STREAM] -codec_name=ac3 -[/STREAM] -[STREAM] -codec_name=mpeg2video -[/STREAM] -[STREAM] -codec_name=scte_35 -[/STREAM] -[/PROGRAM] [STREAM] codec_name=ac3 [/STREAM] diff --git a/tests/ref/fate/mpegts-probe-program b/tests/ref/fate/mpegts-probe-program index bb1012c8c7..d2c379d485 100644 --- a/tests/ref/fate/mpegts-probe-program +++ b/tests/ref/fate/mpegts-probe-program @@ -1,8 +1,3 @@ -[PROGRAM] -[STREAM] -codec_name=hevc -[/STREAM] -[/PROGRAM] [STREAM] codec_name=hevc [/STREAM] diff --git a/tests/ref/fate/mpegts-probe-program b/tests/ref/fate/mpegts-probe-program-stream similarity index 61% copy from tests/ref/fate/mpegts-probe-program copy to tests/ref/fate/mpegts-probe-program-stream index bb1012c8c7..42fc27f0cc 100644 --- a/tests/ref/fate/mpegts-probe-program +++ b/tests/ref/fate/mpegts-probe-program-stream @@ -3,6 +3,3 @@ codec_name=hevc [/STREAM] [/PROGRAM] -[STREAM] -codec_name=hevc -[/STREAM] diff --git a/tests/ref/fate/mpegts-probe-latm b/tests/ref/fate/mpegts-probe-show-program similarity index 100% copy from tests/ref/fate/mpegts-probe-latm copy to tests/ref/fate/mpegts-probe-show-program -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
