mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19: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;
|
||||
gboolean success = FALSE;
|
||||
|
||||
if (priv->has_profiles)
|
||||
GST_VAAPI_DISPLAY_LOCK (display);
|
||||
|
||||
if (priv->has_profiles) {
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
priv->decoders = g_array_new (FALSE, FALSE, sizeof (GstVaapiConfig));
|
||||
if (!priv->decoders)
|
||||
|
@ -545,6 +549,7 @@ ensure_profiles (GstVaapiDisplay * display)
|
|||
cleanup:
|
||||
g_free (profiles);
|
||||
g_free (entrypoints);
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
return success;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue