]> git.sesse.net Git - ffmpeg/commit
avformat/matroskaenc: Use random TrackUID
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 29 Dec 2019 00:33:36 +0000 (01:33 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 13 Apr 2020 06:17:00 +0000 (08:17 +0200)
commit45314ff21ad329593c8ff8c19010cbb290450c82
treed2a1e20f7f43a46288873d07a85deeefa6342638
parentbd7dea3f4f185a32966d7542837030d843c8518d
avformat/matroskaenc: Use random TrackUID

Up until now, the TrackUID of a Matroska track which is supposed to be
random was not random at all: It always coincided with the TrackNumber
which is usually the 1-based index of the corresponding stream in the
array of AVStreams. This has been changed: It is now set via an AVLFG
if AVFMT_FLAG_BITEXACT is not set. Otherwise it is set like it is set
now (the only change happens if an explicit track number has been
chosen via dash_track_number, because the system used in the normal
situation is now used, too). In particular, no FATE tests need to be
updated.

This also fixes a bug in case the dash_track_number option was used:
In this case the TrackUID was set to the provided number, but the tags
were written with a TagTrackUID simply based upon the index, so that
the tags didn't apply to the track they ought to apply to.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/matroskaenc.c