mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
qtmux: Avoid a buffer metadata copy if possible
If first_ts is 0 there is no need to subtract, so we might skip some copying to make the buffer metadata writable.
This commit is contained in:
parent
ca77c96c51
commit
4737090594
1 changed files with 2 additions and 1 deletions
|
@ -2128,7 +2128,8 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
|
|||
buf = pad->prepare_buf_func (pad, buf, qtmux);
|
||||
}
|
||||
|
||||
if (G_LIKELY (buf != NULL && GST_CLOCK_TIME_IS_VALID (pad->first_ts))) {
|
||||
if (G_LIKELY (buf != NULL && GST_CLOCK_TIME_IS_VALID (pad->first_ts) &&
|
||||
pad->first_ts != 0)) {
|
||||
buf = gst_buffer_make_metadata_writable (buf);
|
||||
check_and_subtract_ts (qtmux, &GST_BUFFER_TIMESTAMP (buf), pad->first_ts);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue