From: Thiago Santos Date: Tue, 23 Jun 2015 01:22:09 +0000 (-0300) Subject: qtmux: store last_dts of the first buffer X-Git-Tag: 1.19.3~509^2~3495 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ec9a86e72e4b795a2126f0d337df808fae86f78;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 5548a0cc1c..2ee662f12e 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -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 {