From bd7f101bda80d0deae585bd2e0cedb4154d7697e Mon Sep 17 00:00:00 2001 From: James Almer Date: Mon, 23 Mar 2026 10:50:02 -0300 Subject: [PATCH] avformat/mov: don't try to create an LCEVC group if there's a single track In this scenario, as it's the case with DASH segments, the lcevc track will be alone but potentially have a sbas tref entry referencing itself, which will make avformat_stream_group_add_stream() fail. Signed-off-by: James Almer (cherry picked from commit e1158301f0b7b98883b9614946d0eb2442e52d58) --- libavformat/mov.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index f026c0fb4c..c222ee11e7 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -10793,6 +10793,10 @@ static int mov_parse_lcevc_streams(AVFormatContext *s) { int err; + // Don't try to add a group if there's only one track + if (s->nb_streams <= 1) + return 0; + for (int i = 0; i < s->nb_streams; i++) { AVStreamGroup *stg; AVStream *st = s->streams[i];