asfdemux: Don't set durations of 0 on outgoing buffers.

Some (broken) streams don't have the extended stream properties in
the header, resulting in applying a duration of zero on outgoing
buffers.

Fixes #611473
This commit is contained in:
Edward Hervey 2010-03-01 14:07:20 +01:00
parent 79b154e4f7
commit 48a1935cb0

View file

@ -1406,7 +1406,8 @@ gst_asf_demux_push_complete_payloads (GstASFDemux * demux, gboolean force)
* position reporting if a live src is playing not so live content
* (e.g. rtspsrc taking some time to fall back to tcp) */
GST_BUFFER_TIMESTAMP (payload->buf) = payload->ts + demux->in_gap;
if (payload->duration == GST_CLOCK_TIME_NONE)
if (payload->duration == GST_CLOCK_TIME_NONE
&& stream->ext_props.avg_time_per_frame != 0)
GST_BUFFER_DURATION (payload->buf) =
stream->ext_props.avg_time_per_frame * 100;
else