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:
Thiago Santos 2015-06-22 22:22:09 -03:00 committed by Nicolas Dufresne
parent e44ce40455
commit 1ec9a86e72

View file

@ -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 {