mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
Use a recursive mutex so that a single thread can lock
several times. This fixes decoding of MPEG-2 and H.264 because those created a GstVaapiContext later through avcodec_decode_video() that was a protected call.
This commit is contained in:
parent
edef951fb2
commit
da3948bdeb
2 changed files with 4 additions and 4 deletions
|
@ -419,13 +419,13 @@ end:
|
|||
static void
|
||||
gst_vaapi_display_lock_default(GstVaapiDisplay *display)
|
||||
{
|
||||
g_static_mutex_lock(&display->priv->mutex);
|
||||
g_static_rec_mutex_lock(&display->priv->mutex);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_vaapi_display_unlock_default(GstVaapiDisplay *display)
|
||||
{
|
||||
g_static_mutex_unlock(&display->priv->mutex);
|
||||
g_static_rec_mutex_unlock(&display->priv->mutex);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -562,7 +562,7 @@ gst_vaapi_display_init(GstVaapiDisplay *display)
|
|||
priv->subpicture_formats = NULL;
|
||||
priv->create_display = TRUE;
|
||||
|
||||
g_static_mutex_init(&priv->mutex);
|
||||
g_static_rec_mutex_init(&priv->mutex);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -69,7 +69,7 @@ G_BEGIN_DECLS
|
|||
* Base class for VA displays.
|
||||
*/
|
||||
struct _GstVaapiDisplayPrivate {
|
||||
GStaticMutex mutex;
|
||||
GStaticRecMutex mutex;
|
||||
VADisplay display;
|
||||
guint width;
|
||||
guint height;
|
||||
|
|
Loading…
Reference in a new issue