mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
asfdemux: Use the average frame duration for buffers without a duration.
This will still cause some timestamp jitter, but giving a hint as to the duration rather than nothing seems to be a better idea. Also, this allows some scenarios (like remuxing with asfmux) to estimate the total duration using the accumulated packet duration (which will be correct).
This commit is contained in:
parent
99d9b34385
commit
725da8579b
1 changed files with 5 additions and 1 deletions
|
@ -1314,6 +1314,10 @@ 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)
|
||||
GST_BUFFER_DURATION (payload->buf) =
|
||||
stream->ext_props.avg_time_per_frame * 100;
|
||||
else
|
||||
GST_BUFFER_DURATION (payload->buf) = payload->duration;
|
||||
|
||||
/* FIXME: we should really set durations on buffers if we can */
|
||||
|
|
Loading…
Reference in a new issue