mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
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
This commit is contained in:
parent
6970dc1277
commit
03e85bbc0f
1 changed files with 5 additions and 1 deletions
|
@ -1001,9 +1001,13 @@ gst_vaapidecode_flush (GstVideoDecoder * vdec)
|
|||
{
|
||||
GstVaapiDecode *const decode = GST_VAAPIDECODE (vdec);
|
||||
|
||||
if (decode->decoder && !gst_vaapidecode_internal_flush (vdec))
|
||||
if (!decode->decoder)
|
||||
return FALSE;
|
||||
|
||||
GST_LOG_OBJECT (vdec, "flushing");
|
||||
|
||||
gst_vaapidecode_purge (decode);
|
||||
|
||||
/* There could be issues if we avoid the reset_full() while doing
|
||||
* seeking: we have to reset the internal state */
|
||||
return gst_vaapidecode_reset_full (decode, decode->sinkpad_caps, TRUE);
|
||||
|
|
Loading…
Reference in a new issue