mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
libs: display: lock ensure_profile()
Thread safety patch for ensure_profile() function Fixes #133
This commit is contained in:
parent
3fd91adc00
commit
4aae03d3c1
1 changed files with 6 additions and 1 deletions
|
@ -463,8 +463,12 @@ ensure_profiles (GstVaapiDisplay * display)
|
||||||
VAStatus status;
|
VAStatus status;
|
||||||
gboolean success = FALSE;
|
gboolean success = FALSE;
|
||||||
|
|
||||||
if (priv->has_profiles)
|
GST_VAAPI_DISPLAY_LOCK (display);
|
||||||
|
|
||||||
|
if (priv->has_profiles) {
|
||||||
|
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
priv->decoders = g_array_new (FALSE, FALSE, sizeof (GstVaapiConfig));
|
priv->decoders = g_array_new (FALSE, FALSE, sizeof (GstVaapiConfig));
|
||||||
if (!priv->decoders)
|
if (!priv->decoders)
|
||||||
|
@ -545,6 +549,7 @@ ensure_profiles (GstVaapiDisplay * display)
|
||||||
cleanup:
|
cleanup:
|
||||||
g_free (profiles);
|
g_free (profiles);
|
||||||
g_free (entrypoints);
|
g_free (entrypoints);
|
||||||
|
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue