videorate: avoid useless buffer copy in drop-only mode
authorFrédéric Bertolus <frederic.bertolus@parrot.com>
Tue, 29 Mar 2016 15:19:41 +0000 (17:19 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Sun, 3 Apr 2016 08:37:52 +0000 (11:37 +0300)
commit2626c02149ab7947cec9890215a76bddb643554c
tree7a29f78d6b7cff8fc29bfdb850d0b9a1a7f4891b
parent9e311960cdbb4805a6c76cefdf7eebb2802ae8ce
videorate: avoid useless buffer copy in drop-only mode

Make writable the buffer before pushing it lead to a buffer copy. It's
because a reference is keep for the previous buffer.
The previous buffer reference is only need to duplicate the buffer. In
drop-only mode, the previous buffer is release just after pushing the
buffer so a copy is done but it's useless.

https://bugzilla.gnome.org/show_bug.cgi?id=764319
gst/videorate/gstvideorate.c