kmsbufferpool: Don't check allocator pointer twice

https://bugzilla.gnome.org/show_bug.cgi?id=787593
This commit is contained in:
Nicolas Dufresne 2017-09-11 16:32:32 -04:00
parent 0a25ca893d
commit 119294f3fc

View file

@ -87,8 +87,7 @@ gst_kms_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
if (allocator && GST_IS_KMS_ALLOCATOR (allocator)) {
if (priv->allocator)
gst_object_unref (priv->allocator);
if ((priv->allocator = allocator))
gst_object_ref (allocator);
priv->allocator = gst_object_ref (allocator);
}
if (!priv->allocator)
goto no_allocator;