videodecoder: Consider having output data when the subclass drops a frame
authorSebastian Dröge <sebastian@centricular.com>
Mon, 14 Nov 2022 18:38:09 +0000 (20:38 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 15 Nov 2022 21:18:50 +0000 (21:18 +0000)
The subclass might drop a frame for QoS reasons (e.g. vpxdec) and if all
frames are dropped because of that it wouldn't make sense to post an
error message on EOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3408>

subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c

index f1ce52fd1f6a053c8db91170f2d27154f92abeb9..016aa7dd9f1bfb1864b6093c7d9fbd41b011b12d 100644 (file)
@@ -3270,6 +3270,9 @@ gst_video_decoder_drop_frame (GstVideoDecoder * dec, GstVideoCodecFrame * frame)
   /* now free the frame */
   gst_video_decoder_release_frame (dec, frame);
 
+  /* store that we have valid decoded data */
+  dec->priv->had_output_data = TRUE;
+
   GST_VIDEO_DECODER_STREAM_UNLOCK (dec);
 
   return GST_FLOW_OK;