display: fix destruction of mutex.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 25 Jul 2012 09:37:26 +0000 (11:37 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 25 Jul 2012 12:37:11 +0000 (14:37 +0200)
gst-libs/gst/vaapi/gstvaapidisplay.c

index f4352bd..7972003 100644 (file)
@@ -382,7 +382,6 @@ gst_vaapi_display_destroy(GstVaapiDisplay *display)
         gst_vaapi_display_cache_remove(get_display_cache(), display);
         free_display_cache();
     }
-    g_static_rec_mutex_free(&priv->mutex);
 }
 
 static gboolean
@@ -577,6 +576,8 @@ gst_vaapi_display_finalize(GObject *object)
 
     gst_vaapi_display_destroy(display);
 
+    g_static_rec_mutex_free(&display->priv->mutex);
+
     G_OBJECT_CLASS(gst_vaapi_display_parent_class)->finalize(object);
 }