From: Seungha Yang Date: Fri, 5 May 2023 19:14:49 +0000 (+0900) Subject: h264decoder: Drop nonexisting picture silently without error X-Git-Tag: 1.22.7~294 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43461432ec1af623d2b6f58693868023d9bf7288;p=platform%2Fupstream%2Fgstreamer.git h264decoder: Drop nonexisting picture silently without error If end_picture() was not successful, we do drop corresponding GstVideoCodecFrame and therefore gst_video_decoder_get_frame() will return nullptr which is expected behavior. Part-of: --- diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth264decoder.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth264decoder.c index 86a45aa..fc7d3a1 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth264decoder.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth264decoder.c @@ -1792,10 +1792,16 @@ gst_h264_decoder_do_output_picture (GstH264Decoder * self, picture->system_frame_number); if (!frame) { - GST_ERROR_OBJECT (self, - "No available codec frame with frame number %d", - picture->system_frame_number); - UPDATE_FLOW_RETURN (ret, GST_FLOW_ERROR); + /* The case where the end_picture() got failed and corresponding + * GstVideoCodecFrame was dropped already */ + if (picture->nonexisting) { + GST_DEBUG_OBJECT (self, "Dropping non-existing picture %p", picture); + } else { + GST_ERROR_OBJECT (self, + "No available codec frame with frame number %d", + picture->system_frame_number); + UPDATE_FLOW_RETURN (ret, GST_FLOW_ERROR); + } gst_h264_picture_unref (picture);