summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2019-12-17 16:57:41 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2019-12-17 18:31:36 +0100
commitd69a4b8c0553d57583772600ceb7a1433e354af8 (patch)
tree32dddace417bf1820981f94ff05941b4b4d18900
parent47b0932911bc7b7043e16355ba39c722c0289029 (diff)
libs: encoder: h264fei: remove unnecessary check
Issue detected by Coverity There may be a null pointer dereference, or else the comparison against null is unnecessary. In gst_vaapi_encoder_h264_fei_encode: All paths that lead to this null pointer comparison already dereference the pointer earlier
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c
index e0fbe505..d643a6a6 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c
@@ -2837,9 +2837,8 @@ gst_vaapi_encoder_h264_fei_encode (GstVaapiEncoder * base_encoder,
/* ERRORS */
error:
{
- if (reconstruct)
- gst_vaapi_encoder_release_surface (GST_VAAPI_ENCODER (encoder),
- reconstruct);
+ gst_vaapi_encoder_release_surface (GST_VAAPI_ENCODER (encoder),
+ reconstruct);
if (picture2)
gst_vaapi_enc_picture_unref (picture2);
return status;