From: He Junyan Date: Thu, 29 Jul 2021 13:30:32 +0000 (+0800) Subject: codecs: h264dec: Output the picture directly if already a frame. X-Git-Tag: 1.19.3~507^2~119 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70ce2327d0dc10941eafe01a39cb3dc6d776a800;p=platform%2Fupstream%2Fgstreamer.git codecs: h264dec: Output the picture directly if already a frame. We forget one case that is the frame and field pictures may be mixed together. For this case, the dpb is interlaced while the last picture may be a complete frame. We do not need to cache that complete picture and should output it directly. Part-of: --- diff --git a/gst-libs/gst/codecs/gsth264decoder.c b/gst-libs/gst/codecs/gsth264decoder.c index f179be4..2632896 100644 --- a/gst-libs/gst/codecs/gsth264decoder.c +++ b/gst-libs/gst/codecs/gsth264decoder.c @@ -724,7 +724,7 @@ output_picture_directly (GstH264Decoder * self, GstH264Picture * picture) GstH264Picture *out_pic = NULL; gboolean ret = TRUE; - if (!gst_h264_dpb_get_interlaced (priv->dpb)) { + if (GST_H264_PICTURE_IS_FRAME (picture)) { g_assert (priv->last_field == NULL); out_pic = g_steal_pointer (&picture); ret = TRUE;