mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:56:14 +00:00
mfc: Set variables to NULL to prevent usage after free/unref
This commit is contained in:
parent
b244151f85
commit
f5ef0dd7ee
1 changed files with 4 additions and 0 deletions
|
@ -804,6 +804,7 @@ gst_mfc_dec_dequeue_output (GstMFCDec * self)
|
||||||
"Dropping too late frame: deadline %" G_GINT64_FORMAT, deadline);
|
"Dropping too late frame: deadline %" G_GINT64_FORMAT, deadline);
|
||||||
ret = gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), frame);
|
ret = gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), frame);
|
||||||
frame = NULL;
|
frame = NULL;
|
||||||
|
outbuf = NULL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -858,6 +859,9 @@ gst_mfc_dec_dequeue_output (GstMFCDec * self)
|
||||||
if (state)
|
if (state)
|
||||||
gst_video_codec_state_unref (state);
|
gst_video_codec_state_unref (state);
|
||||||
|
|
||||||
|
frame = NULL;
|
||||||
|
outbuf = NULL;
|
||||||
|
|
||||||
if (ret != GST_FLOW_OK)
|
if (ret != GST_FLOW_OK)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue