mpegdemux: fix some more video freezing

There was a second threshold, which apparently needs to be smaller
than the first, though I'm not certain of it as I don't understand
yet this nest of wtf that is the mpeg demuxer timing logic.

Fixes video freezing on one (corrupted) MPEG sample. It would
previously never think it was out of the discontinuity, and would
push buffers with no timestamp.

Now this took me more than a day's poking at the thing, for just
one constant change, and I'm scared to have to touch this again :S

https://bugzilla.gnome.org/show_bug.cgi?id=655804
This commit is contained in:
Vincent Penquerc'h 2011-09-03 14:37:40 +01:00
parent 7960280afb
commit 918d2e710f

View file

@ -1777,9 +1777,9 @@ gst_mpegts_demux_parse_adaptation_field (GstMpegTSStream * stream,
stream->last_PCR,
GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (stream->last_PCR)));
/* pcr has been converted into units of 90Khz ticks
* so assume discont if last pcr was > 900000 (10 second) lower */
* so assume discont if last pcr was > 90000 (1 second) lower */
if (stream->last_PCR != -1 &&
(pcr - stream->last_PCR > 900000 || pcr < stream->last_PCR)) {
(pcr - stream->last_PCR > 90000 || pcr < stream->last_PCR)) {
GstClockTimeDiff base_time_difference;
GST_DEBUG_OBJECT (demux,