mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
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:
parent
6675ed9aae
commit
74b7493fd3
1 changed files with 10 additions and 4 deletions
|
@ -1791,10 +1791,16 @@ gst_h264_decoder_do_output_picture (GstH264Decoder * self,
|
||||||
picture->system_frame_number);
|
picture->system_frame_number);
|
||||||
|
|
||||||
if (!frame) {
|
if (!frame) {
|
||||||
GST_ERROR_OBJECT (self,
|
/* The case where the end_picture() got failed and corresponding
|
||||||
"No available codec frame with frame number %d",
|
* GstVideoCodecFrame was dropped already */
|
||||||
picture->system_frame_number);
|
if (picture->nonexisting) {
|
||||||
UPDATE_FLOW_RETURN (ret, GST_FLOW_ERROR);
|
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);
|
gst_h264_picture_unref (picture);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue