gstbuffer: reset buffer to its original size if intact
authorPetr Kulhavy <brain@jikos.cz>
Mon, 14 Nov 2016 14:35:50 +0000 (15:35 +0100)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 21 Mar 2018 21:50:30 +0000 (17:50 -0400)
commit7d75d3ef4181de6658fe7d4dbbe633082257315d
tree1df5e7bd6a56775636fe82a9a110c21ff5ff1313
parent29e81988fbdb56391d6b99e9195a74695a9a875f
gstbuffer: reset buffer to its original size if intact

Enhance default_reset_buffer() to resize the buffer to its full size if the
memory hasn't changed. This allows to reuse the buffer even if the offset has
changed or the size has shrunk, rather than freeing the buffer.

Change related to: https://bugzilla.gnome.org/show_bug.cgi?id=772841
gst/gstbufferpool.c