avimux: don't make the buffer writable unless absolutely necessary
https://bugzilla.gnome.org/show_bug.cgi?id=722396
This commit is contained in:
parent
3978f6ae6c
commit
447556fe6b
@ -1998,13 +1998,16 @@ gst_avi_mux_do_buffer (GstAviMux * avimux, GstAviPad * avipad)
|
|||||||
gulong total_size, pad_bytes = 0;
|
gulong total_size, pad_bytes = 0;
|
||||||
guint flags;
|
guint flags;
|
||||||
gsize datasize;
|
gsize datasize;
|
||||||
|
GstClockTime time;
|
||||||
|
|
||||||
data = gst_collect_pads_pop (avimux->collect, avipad->collect);
|
data = gst_collect_pads_pop (avimux->collect, avipad->collect);
|
||||||
/* arrange downstream running time */
|
/* arrange downstream running time */
|
||||||
data = gst_buffer_make_writable (data);
|
time = gst_segment_to_running_time (&avipad->collect->segment,
|
||||||
GST_BUFFER_TIMESTAMP (data) =
|
|
||||||
gst_segment_to_running_time (&avipad->collect->segment,
|
|
||||||
GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (data));
|
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 */
|
/* Prepend a special buffer to the first one for some formats */
|
||||||
if (avipad->is_video) {
|
if (avipad->is_video) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user