flvdemux: be careful with negative cts

Fixes #661477.
This commit is contained in:
Stas Sergeev 2011-10-11 20:56:51 +04:00 committed by Mark Nauwelaerts
parent 4924308d02
commit 6b168ffb44

View file

@ -1195,7 +1195,9 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer)
GST_LOG_OBJECT (demux, "got cts %d", cts);
pts = pts + cts;
/* avoid negative overflow */
if (cts >= 0 || pts >= -cts)
pts += cts;
}
GST_LOG_OBJECT (demux, "video tag with codec tag %u, keyframe (%d) "