codecs: vp9decoder: Fix to output frame when show_existing_frame flag is set
authorSeungha Yang <seungha@centricular.com>
Fri, 26 Mar 2021 13:27:38 +0000 (22:27 +0900)
committerSeungha Yang <seungha@centricular.com>
Fri, 26 Mar 2021 14:50:18 +0000 (14:50 +0000)
When show_existing_frame flag is set, show_frame flag is zero
but we should output previously decoded frame as specified in frame header.

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

gst-libs/gst/codecs/gstvp9decoder.c

index 5e3e2cf..f6d14ab 100644 (file)
@@ -388,7 +388,7 @@ gst_vp9_decoder_handle_frame (GstVideoDecoder * decoder,
 
   gst_buffer_unmap (in_buf, &map);
 
-  if (!picture->frame_hdr.show_frame) {
+  if (!frame_hdr.show_frame && !frame_hdr.show_existing_frame) {
     GST_LOG_OBJECT (self, "Decode only picture %p", picture);
     GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY (frame);