From ac01304ceca6bac4aca14d05a78fa5cb37423057 Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Wed, 17 Feb 2016 17:20:08 +0900 Subject: [PATCH] vaapidecode: Fix videocodec state memory leak When state is not NULL and either width/height of video info is 0, then state leaks https://bugzilla.gnome.org/show_bug.cgi?id=762173 --- gst/vaapi/gstvaapidecode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index 7e216aeb40..2c236c341c 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -254,6 +254,8 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode) if (!state || state->info.width == 0 || state->info.height == 0) { if (features) gst_caps_features_free (features); + if (state) + gst_video_codec_state_unref (state); return FALSE; }