PR #22629 opened by James Almer (jamrial) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22629 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22629.patch
Some faulty files have an LCEVC descriptor with a single stream, resulting in a group being created but never fully populated. >From 69ebdf68e5e0b4bcdf474e94c32c1b0df52350ca Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Thu, 26 Mar 2026 14:44:49 -0300 Subject: [PATCH] avformat/mpegts: don't export LCEVC stream groups if they are not complete Some faulty files have an LCEVC descriptor with a single stream, resulting in a group being created but never fully populated. Signed-off-by: James Almer <[email protected]> --- libavformat/mpegts.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 6f58e52e70..778bd9050b 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2746,6 +2746,12 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len mpegts_open_pcr_filter(ts, pcr_pid); out: + for (int i = ts->stream->nb_stream_groups - 1; i >= 0; i--) { + AVStreamGroup *stg = ts->stream->stream_groups[i]; + av_assert0(stg->type == AV_STREAM_GROUP_PARAMS_LCEVC); + if (stg->nb_streams == 1) + ff_remove_stream_group(ts->stream, stg); + } for (i = 0; i < mp4_descr_count; i++) av_free(mp4_descr[i].dec_config_descr); } -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
