Commit 7077425c authored by Edward Hervey's avatar Edward Hervey 🤘 Committed by Edward Hervey

qtmux: Don't forget to update pad->last_buf

buf is the current pad->last_buf value. If ever it gets copied/unreffed,
we need to make sure to write back the new  pointer to the last_buf
variable.

Fixes using wrong pointer values in the case of decrasing DTS value
parent 7e9b7658
......@@ -3276,7 +3276,7 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
GST_ERROR ("decreasing DTS value %" GST_TIME_FORMAT " < %" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_DTS (buf)),
GST_TIME_ARGS (GST_BUFFER_DTS (last_buf)));
buf = gst_buffer_make_writable (buf);
pad->last_buf = buf = gst_buffer_make_writable (buf);
GST_BUFFER_DTS (buf) = GST_BUFFER_DTS (last_buf);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment