flvmux: Save dts from buffer

We no longer set dts in muxed buffer. This would lead to encoding tags
with timestamp 0 instead of the timestamp of previous buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=731352
This commit is contained in:
Nicolas Dufresne 2014-08-27 20:56:12 -04:00
parent c1e7bec616
commit aa5bd99127

View file

@ -1301,6 +1301,7 @@ gst_flv_mux_write_buffer (GstFlvMux * mux, GstFlvPad * cpad, GstBuffer * buffer)
{
GstBuffer *tag;
GstFlowReturn ret;
GstClockTime dts = GST_BUFFER_DTS (buffer);
/* clipping function arranged for running_time */
@ -1313,8 +1314,9 @@ gst_flv_mux_write_buffer (GstFlvMux * mux, GstFlvPad * cpad, GstBuffer * buffer)
ret = gst_flv_mux_push (mux, tag);
if (ret == GST_FLOW_OK && GST_BUFFER_DTS_IS_VALID (tag))
cpad->last_timestamp = GST_BUFFER_DTS (tag);
if (ret == GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (dts))
cpad->last_timestamp = dts;
return ret;
}