diff options
-rw-r--r-- | sys/vdpau/gstvdpdecoder.c | 1 | ||||
-rw-r--r-- | sys/vdpau/gstvdpmpegdecoder.c | 14 |
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 */ |