From fda9c56a590659323c0e503933dea946a42bf8f6 Mon Sep 17 00:00:00 2001 From: Carl-Anton Ingmarsson Date: Tue, 5 May 2009 17:30:33 +0200 Subject: vdpaumpegdec: remove unneeded locking since we know do StateChange correctly --- sys/vdpau/gstvdpmpegdecoder.c | 12 ------------ sys/vdpau/gstvdpmpegdecoder.h | 2 -- 2 files changed, 14 deletions(-) (limited to 'sys') diff --git a/sys/vdpau/gstvdpmpegdecoder.c b/sys/vdpau/gstvdpmpegdecoder.c index 4bcbf534..eda32c60 100644 --- a/sys/vdpau/gstvdpmpegdecoder.c +++ b/sys/vdpau/gstvdpmpegdecoder.c @@ -364,12 +364,9 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer) mpeg_dec = GST_VDP_MPEG_DECODER (GST_OBJECT_PARENT (pad)); - g_mutex_lock (mpeg_dec->mutex); - if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT))) { GST_DEBUG_OBJECT (mpeg_dec, "Received discont buffer"); gst_vdp_mpeg_decoder_reset (mpeg_dec); - g_mutex_unlock (mpeg_dec->mutex); return GST_FLOW_OK; } @@ -404,7 +401,6 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer) if (!gst_vdp_mpeg_decoder_parse_picture (mpeg_dec, packet_start, packet_end)) { - g_mutex_unlock (mpeg_dec->mutex); return GST_FLOW_OK; } break; @@ -442,8 +438,6 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer) if (mpeg_dec->vdp_info.slice_count > 0) ret = gst_vdp_mpeg_decoder_decode (mpeg_dec, GST_BUFFER_TIMESTAMP (buffer)); - g_mutex_unlock (mpeg_dec->mutex); - return ret; } @@ -462,10 +456,7 @@ gst_vdp_mpeg_decoder_sink_event (GstPad * pad, GstEvent * event) { GST_DEBUG_OBJECT (mpeg_dec, "flush stop"); - g_mutex_lock (mpeg_dec->mutex); gst_vdp_mpeg_decoder_reset (mpeg_dec); - g_mutex_unlock (mpeg_dec->mutex); - res = gst_pad_push_event (dec->src, event); break; @@ -581,8 +572,6 @@ gst_vdp_mpeg_decoder_init (GstVdpMpegDecoder * mpeg_dec, mpeg_dec->decoder = VDP_INVALID_HANDLE; gst_vdp_mpeg_decoder_init_info (&mpeg_dec->vdp_info); - mpeg_dec->mutex = g_mutex_new (); - mpeg_dec->broken_gop = FALSE; mpeg_dec->adapter = gst_adapter_new (); @@ -596,7 +585,6 @@ gst_vdp_mpeg_decoder_finalize (GObject * object) { GstVdpMpegDecoder *mpeg_dec = (GstVdpMpegDecoder *) object; - g_mutex_free (mpeg_dec->mutex); g_object_unref (mpeg_dec->adapter); } diff --git a/sys/vdpau/gstvdpmpegdecoder.h b/sys/vdpau/gstvdpmpegdecoder.h index 57ab66ab..06bed84b 100644 --- a/sys/vdpau/gstvdpmpegdecoder.h +++ b/sys/vdpau/gstvdpmpegdecoder.h @@ -47,8 +47,6 @@ struct _GstVdpMpegDecoder VdpPictureInfoMPEG1Or2 vdp_info; GstBuffer *f_buffer; GstBuffer *b_buffer; - - GMutex *mutex; gboolean broken_gop; -- cgit v1.2.1