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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4561>
This commit is contained in:
Seungha Yang 2023-05-06 04:14:49 +09:00 committed by GStreamer Marge Bot
parent 6675ed9aae
commit 74b7493fd3

View file

@ -1791,10 +1791,16 @@ gst_h264_decoder_do_output_picture (GstH264Decoder * self,
picture->system_frame_number);
if (!frame) {
/* 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);