vp8decoder: Drain the output queue on EOS/finish
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 16 Jun 2021 14:31:13 +0000 (10:31 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 16 Jun 2021 17:34:54 +0000 (17:34 +0000)
The finish() virtual method was flushing the queue, instead push the
remaining buffers. It is not required to reset in finish() unlike
drain(). This a regression causing last frame to always be lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2333>

gst-libs/gst/codecs/gstvp8decoder.c

index d3f2aa1..2a9f834 100644 (file)
@@ -279,7 +279,7 @@ gst_vp8_decoder_finish (GstVideoDecoder * decoder)
 
   GST_DEBUG_OBJECT (self, "finish");
 
-  gst_vp8_decoder_reset (self);
+  gst_vp8_decoder_drain_output_queue (GST_VP8_DECODER (decoder), 0);
 
   return GST_FLOW_OK;
 }