[Bug 780767] videorate: buffers are copied in drop-only mode

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Apr 4 11:24:20 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=780767

--- Comment #2 from Guillaume Desmottes <gdesmott at gnome.org> ---
Created attachment 349227
  --> https://bugzilla.gnome.org/attachment.cgi?id=349227&action=edit
videorate: stop copying buffers in drop-only mode

gst_video_rate_flush_prev() ensures that the pushed buffer is writable
by calling gst_buffer_make_writable() on videorate->prevbuf.

In drop-only mode we always push buffers directly when they are received
from GstBaseTransform (gst_video_rate_transform_ip()) and do not keep them
around. GstBaseTransform already ensures that those buffers are
writable so there is no need to do it twice.

This change saves us from copying buffers in drop-only mode as we no longer
calls gst_buffer_make_writable() with a buffer having a refcount of 2
(one ref owned by GstBaseTransform and one in videorate->prevbuf).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list