vaapivideomemory: avoid NULL pointer unref if GstVaapiImage creation failed.

https://bugzilla.gnome.org/show_bug.cgi?id=735156
This commit is contained in:
Sreerenj Balachandran 2014-08-21 15:04:20 +03:00 committed by Gwenole Beauchesne
parent c257c3232a
commit aa4d1f5a1e

View file

@ -654,7 +654,8 @@ gst_vaapi_video_allocator_new (GstVaapiDisplay * display,
gst_video_info_update_from_image (&allocator->image_info, image);
gst_vaapi_image_unmap (image);
} while (0);
gst_vaapi_object_unref (image);
if (image)
gst_vaapi_object_unref (image);
}
allocator->image_pool = gst_vaapi_image_pool_new (display,