summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2009-05-05 17:15:33 +0200
committerJan Schmidt <thaytan@noraisin.net>2009-06-20 15:21:35 +0100
commit323b563c24027d8f657c998c56458014ac97da46 (patch)
treeb1bd23cad76e729d9c32bfd01124d1f40acc3b62 /sys
parente417b2eea0256d5a4a8355f2472e3af3777a2d0c (diff)
downloadgst-plugins-bad-323b563c24027d8f657c998c56458014ac97da46.tar.gz
gst-plugins-bad-323b563c24027d8f657c998c56458014ac97da46.tar.bz2
gst-plugins-bad-323b563c24027d8f657c998c56458014ac97da46.zip
vdpaumpegdec: fixup state change
Diffstat (limited to 'sys')
-rw-r--r--sys/vdpau/gstvdpdecoder.c1
-rw-r--r--sys/vdpau/gstvdpmpegdecoder.c14
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/vdpau/gstvdpdecoder.c b/sys/vdpau/gstvdpdecoder.c
index 7aca6c2f..2b0c888e 100644
--- a/sys/vdpau/gstvdpdecoder.c
+++ b/sys/vdpau/gstvdpdecoder.c
@@ -182,7 +182,6 @@ gst_vdp_decoder_init (GstVdpDecoder * dec, GstVdpDecoderClass * klass)
(GST_ELEMENT_CLASS (klass), "sink"), "sink");
gst_pad_set_setcaps_function (dec->sink, gst_vdp_decoder_sink_set_caps);
gst_element_add_pad (GST_ELEMENT (dec), dec->sink);
- gst_pad_set_active (dec->sink, TRUE);
}
static void
diff --git a/sys/vdpau/gstvdpmpegdecoder.c b/sys/vdpau/gstvdpmpegdecoder.c
index bf3ea423..c63b6c0d 100644
--- a/sys/vdpau/gstvdpmpegdecoder.c
+++ b/sys/vdpau/gstvdpmpegdecoder.c
@@ -483,18 +483,23 @@ gst_vdp_mpeg_decoder_change_state (GstElement * element,
{
GstVdpMpegDecoder *mpeg_dec;
GstVdpDecoder *dec;
+ GstStateChangeReturn ret;
mpeg_dec = GST_VDP_MPEG_DECODER (element);
dec = GST_VDP_DECODER (mpeg_dec);
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;
+ default:
+ break;
+ }
+
+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+ switch (transition) {
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);
@@ -502,13 +507,12 @@ 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;
}
- return GST_STATE_CHANGE_SUCCESS;
+ return ret;
}
/* GObject vmethod implementations */