diff options
author | Luis de Bethencourt <luis@debethencourt.com> | 2015-08-05 11:11:11 +0100 |
---|---|---|
committer | Luis de Bethencourt <luis@debethencourt.com> | 2015-08-05 11:11:14 +0100 |
commit | 54b317ef786c7f9db87b54d1e6d77aacc59c6378 (patch) | |
tree | 0c5c9924721a1a710142d1bd70a2c1c8a72de4be /ext/x265 | |
parent | 3129396643937796b27325c70d12efec34c6045e (diff) | |
download | gstreamer-plugins-bad-54b317ef786c7f9db87b54d1e6d77aacc59c6378.tar.gz |
x265enc: fix memory leak
Free vps_nal before returning.
CID #1315257
Diffstat (limited to 'ext/x265')
-rw-r--r-- | ext/x265/gstx265enc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/x265/gstx265enc.c b/ext/x265/gstx265enc.c index 47b95a66a..18577d06c 100644 --- a/ext/x265/gstx265enc.c +++ b/ext/x265/gstx265enc.c @@ -735,6 +735,7 @@ gst_x265_enc_set_level_tier_and_profile (GstX265Enc * encoder, GstCaps * caps) x265_nal *nal, *vps_nal; guint32 i_nal; int header_return; + gboolean ret = TRUE; GST_DEBUG_OBJECT (encoder, "set profile, level and tier"); @@ -756,12 +757,12 @@ gst_x265_enc_set_level_tier_and_profile (GstX265Enc * encoder, GstCaps * caps) vps_nal->payload + 6, vps_nal->sizeBytes - 6)) { GST_ELEMENT_ERROR (encoder, STREAM, ENCODE, ("Encode x265 failed."), ("Failed to find correct level, tier or profile in VPS")); - return FALSE; + ret = FALSE; } x265_nal_free (vps_nal); - return TRUE; + return ret; } static GstBuffer * |