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
This commit is contained in:
Vineeth TM 2016-02-17 17:20:08 +09:00 committed by Sebastian Dröge
parent 38fbe58999
commit ac01304cec

View file

@ -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;
}