inputselector: fix cached buffer leak in chain function
inputselector: fix cached buffer leak in chain function

gst_selector_pad_chain() was popping cached buffers out of the queue without
freeing those. Make sure we don't steal the GstBuffer as the cached buffer ref
has been passed to the pad chain function.

This can be reproduced by running the
validate.file.playback.switch_subtitle_track_while_paused.test5_mkv scenario
with Valgrind.

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

Signed-off-by: Guillaume Desmottes <f16649c7afcd84e3350287183c4ed23cb1aea57c@collabora.co.uk>

StreamUtils/gstreamer,shelsonjava/gstreamer,jpxiong/gstreamer,StreamUtils/gstreamer,mparis/gstreamer,jpxiong/gstreamer,mparis/gstreamer,mparis/gstreamer,StreamUtils/gstreamer,shelsonjava/gstreamer,krichter722/gstreamer,krichter722/gstreamer,jpxiong/gstreamer,centricular/gstreamer,mparis/gstreamer,mparis/gstreamer,krichter722/gstreamer,centricular/gstreamer,shelsonjava/gstreamer,krichter722/gstreamer,StreamUtils/gstreamer,centricular/gstreamer,centricular/gstreamer,krichter722/gstreamer,jpxiong/gstreamer,shelsonjava/gstreamer,jpxiong/gstreamer,shelsonjava/gstreamer,StreamUtils/gstreamer,centricular/gstreamer