Commit 447556fe authored by Michael Olbrich's avatar Michael Olbrich Committed by Thiago Santos

avimux: don't make the buffer writable unless absolutely necessary

https://bugzilla.gnome.org/show_bug.cgi?id=722396
parent 3978f6ae
......@@ -1998,13 +1998,16 @@ gst_avi_mux_do_buffer (GstAviMux * avimux, GstAviPad * avipad)
gulong total_size, pad_bytes = 0;
guint flags;
gsize datasize;
GstClockTime time;
data = gst_collect_pads_pop (avimux->collect, avipad->collect);
/* arrange downstream running time */
data = gst_buffer_make_writable (data);
GST_BUFFER_TIMESTAMP (data) =
gst_segment_to_running_time (&avipad->collect->segment,
time = gst_segment_to_running_time (&avipad->collect->segment,
GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (data));
if (time != GST_BUFFER_TIMESTAMP (data)) {
data = gst_buffer_make_writable (data);
GST_BUFFER_TIMESTAMP (data) = time;
}
/* Prepend a special buffer to the first one for some formats */
if (avipad->is_video) {
......
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