mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
lavf/mkv: avoid negative ts by default.
This fixes playback in some circumstances (like webm in firefox).
Regression after 2c34367b.
It is also matching the Matroska specifications:
http://matroska.org/technical/specs/notes.html, "The quick eye will
notice that if a Cluster's Timecode is set to zero, it is possible to
have Blocks with a negative Raw Timecode. Blocks with a negative Raw
Timecode are not valid."
This commit is contained in:
committed by
Clément Bœsch
parent
304c37b216
commit
b08273c9ca
@@ -902,6 +902,9 @@ static int mkv_write_header(AVFormatContext *s)
|
||||
if (!strcmp(s->oformat->name, "webm")) mkv->mode = MODE_WEBM;
|
||||
else mkv->mode = MODE_MATROSKAv2;
|
||||
|
||||
if (s->avoid_negative_ts < 0)
|
||||
s->avoid_negative_ts = 1;
|
||||
|
||||
mkv->tracks = av_mallocz(s->nb_streams * sizeof(*mkv->tracks));
|
||||
if (!mkv->tracks)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
Reference in New Issue
Block a user