mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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
1 changed files with 6 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue