asfdemux: convert invalid 0 payload TS into GST_CLOCK_TIME_NONE

... so it does not get used as first (valid) payload ts, whereas
the first real valid payload ts may be considerably larger.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=679838
This commit is contained in:
Nicolas Dufresne 2012-07-16 17:36:19 -04:00 committed by Mark Nauwelaerts
parent f7c5be9dd1
commit cde5a81aba

View file

@ -132,6 +132,12 @@ gst_asf_payload_queue_for_stream (GstASFDemux * demux, AsfPayload * payload,
{
GST_DEBUG_OBJECT (demux, "Got payload for stream %d ts:%" GST_TIME_FORMAT,
stream->id, GST_TIME_ARGS (payload->ts));
/* Before preroll ts might be invalid and set to 0 */
if (G_UNLIKELY (payload->ts == 0 && demux->preroll)) {
payload->ts = GST_CLOCK_TIME_NONE;
}
/* remember the first timestamp in the stream */
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (demux->first_ts) &&
GST_CLOCK_TIME_IS_VALID (payload->ts))) {