mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-03 16:09:39 +00:00
vdpaumpegdec: hold the lock in change_state
This commit is contained in:
parent
6b05d01898
commit
de7fb2006e
1 changed files with 4 additions and 0 deletions
|
@ -489,9 +489,12 @@ gst_vdp_mpeg_decoder_change_state (GstElement * element,
|
|||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||
g_mutex_lock (mpeg_dec->mutex);
|
||||
dec->device = gst_vdp_get_device (dec->display_name);
|
||||
g_mutex_unlock (mpeg_dec->mutex);
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
g_mutex_lock (mpeg_dec->mutex);
|
||||
gst_vdp_mpeg_decoder_reset (mpeg_dec);
|
||||
|
||||
dec->device->vdp_decoder_destroy (mpeg_dec->decoder);
|
||||
|
@ -499,6 +502,7 @@ gst_vdp_mpeg_decoder_change_state (GstElement * element,
|
|||
|
||||
g_object_unref (dec->device);
|
||||
dec->device = NULL;
|
||||
g_mutex_unlock (mpeg_dec->mutex);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue