mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
qtmux: store last_dts of the first buffer
Buffers need not to start at running-time 0 so the last_dts needs to be the value of the first buffer's dts as it is used to compute the duration of the buffers. If it was left at 0 the first buffer would have a larger duration when it shouldn't https://bugzilla.gnome.org/show_bug.cgi?id=751361
This commit is contained in:
parent
e44ce40455
commit
1ec9a86e72
1 changed files with 6 additions and 0 deletions
|
@ -3045,6 +3045,12 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
|
|||
pad->first_ts = GST_BUFFER_DTS (last_buf);
|
||||
}
|
||||
|
||||
if (GST_BUFFER_DTS_IS_VALID (last_buf)) {
|
||||
pad->last_dts = GST_BUFFER_DTS (last_buf);
|
||||
} else if (GST_BUFFER_PTS_IS_VALID (last_buf)) {
|
||||
pad->last_dts = GST_BUFFER_PTS (last_buf);
|
||||
}
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (pad->first_ts)) {
|
||||
GST_DEBUG ("setting first_ts to %" G_GUINT64_FORMAT, pad->first_ts);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue