vaapidecode: call purge at flush()
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Sun, 10 Jul 2016 11:46:25 +0000 (13:46 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Mon, 11 Jul 2016 08:40:14 +0000 (10:40 +0200)
commit03e85bbc0f0bd19b9c6ccd711d299a9c33afbe67
tree70b279d43bab92b70a34db88e58f6720abc8ff3b
parent6970dc127764129a6bcb06fcceb600e057346796
vaapidecode: call purge at flush()

Calling flush() vmethod means "to flush all remaining data from the decoder
without pushing it downstream".

Nonetheless flush() is calling gst_vaapidecode_internal_flush(), which calls
gst_video_decoder_have_frame() if there is still something in the input
adapter, which may push buffers to downstream by calling handle_frame().

This patch changes this behavior by calling gst_vaapidecode_purge() rather
than gst_vaapidecode_internal_flush(), which does what we want: flushes the VA
decoder and releases all the rest of decoded frames.

https://bugzilla.gnome.org/show_bug.cgi?id=768652
gst/vaapi/gstvaapidecode.c