mkvmuxer: Disallow non-monotonically increasing timestamps.
Segment::AddFrame will now return false (fail) when a non-monotonically increasing timestamp value is passed to the method. Change-Id: Icfac093e6bddf18e3ef252df79e35c33dbe1e134
This commit is contained in:
@@ -1575,6 +1575,10 @@ bool Segment::AddFrame(const uint8* frame,
|
||||
if (!CheckHeaderInfo())
|
||||
return false;
|
||||
|
||||
// Check for non-monotonically increasing timestamps.
|
||||
if (timestamp < last_timestamp_)
|
||||
return false;
|
||||
|
||||
// If the segment has a video track hold onto audio frames to make sure the
|
||||
// audio that is associated with the start time of a video key-frame is
|
||||
// muxed into the same cluster.
|
||||
|
||||
Reference in New Issue
Block a user