asfdemux: Make sure we always set proper payload duration.

Some (broken) streams will have a delta of 0, resulting in outgoing
buffers having durations of 0.

Fixes #611473
This commit is contained in:
Edward Hervey 2010-03-01 14:05:58 +01:00
parent cfc2820ce1
commit 79b154e4f7

View file

@ -443,7 +443,10 @@ gst_asf_demux_parse_payload (GstASFDemux * demux, AsfPacket * packet,
&payload_data, &payload_len, sub_payload_len);
payload.ts = ts;
payload.duration = ts_delta;
if (G_LIKELY (ts_delta))
payload.duration = ts_delta;
else
payload.duration = GST_CLOCK_TIME_NONE;
gst_asf_payload_queue_for_stream (demux, &payload, stream);
}