Commit 86de8647 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avformat/matroskaenc: Add check for using explicit TrackNumber

When creating DASH streams, the TrackNumber is externally prescribed
and not derived from the number of streams in the AVFormatContext, so
if the number of tracks for a file using an explicit TrackNumber was
more than one, the resulting file would be broken (it would be impossible
to tell to which track a Block belongs if different tracks share the
same TrackNumber). So disallow this.
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent 945b9287
......@@ -2650,6 +2650,9 @@ static int mkv_init(struct AVFormatContext *s)
track->track_num_size = ebml_num_size(track->track_num);
}
if (mkv->is_dash && nb_tracks != 1)
return AVERROR(EINVAL);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment