summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2009-05-05 08:11:03 +0200
committerJan Schmidt <thaytan@noraisin.net>2009-06-20 15:21:34 +0100
commitde7fb2006e6bad7dba369bcd2d2fc89c965bf5f3 (patch)
tree09373534a2844366fe4307328f79656c1db5c7e9 /sys
parent6b05d01898b44cf4d4081df6be34eb69721967b1 (diff)
downloadgst-plugins-bad-de7fb2006e6bad7dba369bcd2d2fc89c965bf5f3.tar.gz
gst-plugins-bad-de7fb2006e6bad7dba369bcd2d2fc89c965bf5f3.tar.bz2
gst-plugins-bad-de7fb2006e6bad7dba369bcd2d2fc89c965bf5f3.zip
vdpaumpegdec: hold the lock in change_state
Diffstat (limited to 'sys')
-rw-r--r--sys/vdpau/gstvdpmpegdecoder.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vdpau/gstvdpmpegdecoder.c b/sys/vdpau/gstvdpmpegdecoder.c
index 413eefd4..bf3ea423 100644
--- a/sys/vdpau/gstvdpmpegdecoder.c
+++ b/sys/vdpau/gstvdpmpegdecoder.c
@@ -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;