mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
vdpaumpegdec: remove unneeded locking since we know do StateChange correctly
This commit is contained in:
parent
02884b0356
commit
fda9c56a59
2 changed files with 0 additions and 14 deletions
|
@ -364,12 +364,9 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
|
|
||||||
mpeg_dec = GST_VDP_MPEG_DECODER (GST_OBJECT_PARENT (pad));
|
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))) {
|
if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT))) {
|
||||||
GST_DEBUG_OBJECT (mpeg_dec, "Received discont buffer");
|
GST_DEBUG_OBJECT (mpeg_dec, "Received discont buffer");
|
||||||
gst_vdp_mpeg_decoder_reset (mpeg_dec);
|
gst_vdp_mpeg_decoder_reset (mpeg_dec);
|
||||||
g_mutex_unlock (mpeg_dec->mutex);
|
|
||||||
return GST_FLOW_OK;
|
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,
|
if (!gst_vdp_mpeg_decoder_parse_picture (mpeg_dec, packet_start,
|
||||||
packet_end)) {
|
packet_end)) {
|
||||||
g_mutex_unlock (mpeg_dec->mutex);
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -442,8 +438,6 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
if (mpeg_dec->vdp_info.slice_count > 0)
|
if (mpeg_dec->vdp_info.slice_count > 0)
|
||||||
ret = gst_vdp_mpeg_decoder_decode (mpeg_dec, GST_BUFFER_TIMESTAMP (buffer));
|
ret = gst_vdp_mpeg_decoder_decode (mpeg_dec, GST_BUFFER_TIMESTAMP (buffer));
|
||||||
|
|
||||||
g_mutex_unlock (mpeg_dec->mutex);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -462,10 +456,7 @@ gst_vdp_mpeg_decoder_sink_event (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (mpeg_dec, "flush stop");
|
GST_DEBUG_OBJECT (mpeg_dec, "flush stop");
|
||||||
|
|
||||||
g_mutex_lock (mpeg_dec->mutex);
|
|
||||||
gst_vdp_mpeg_decoder_reset (mpeg_dec);
|
gst_vdp_mpeg_decoder_reset (mpeg_dec);
|
||||||
g_mutex_unlock (mpeg_dec->mutex);
|
|
||||||
|
|
||||||
res = gst_pad_push_event (dec->src, event);
|
res = gst_pad_push_event (dec->src, event);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -581,8 +572,6 @@ gst_vdp_mpeg_decoder_init (GstVdpMpegDecoder * mpeg_dec,
|
||||||
mpeg_dec->decoder = VDP_INVALID_HANDLE;
|
mpeg_dec->decoder = VDP_INVALID_HANDLE;
|
||||||
gst_vdp_mpeg_decoder_init_info (&mpeg_dec->vdp_info);
|
gst_vdp_mpeg_decoder_init_info (&mpeg_dec->vdp_info);
|
||||||
|
|
||||||
mpeg_dec->mutex = g_mutex_new ();
|
|
||||||
|
|
||||||
mpeg_dec->broken_gop = FALSE;
|
mpeg_dec->broken_gop = FALSE;
|
||||||
|
|
||||||
mpeg_dec->adapter = gst_adapter_new ();
|
mpeg_dec->adapter = gst_adapter_new ();
|
||||||
|
@ -596,7 +585,6 @@ gst_vdp_mpeg_decoder_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
GstVdpMpegDecoder *mpeg_dec = (GstVdpMpegDecoder *) object;
|
GstVdpMpegDecoder *mpeg_dec = (GstVdpMpegDecoder *) object;
|
||||||
|
|
||||||
g_mutex_free (mpeg_dec->mutex);
|
|
||||||
g_object_unref (mpeg_dec->adapter);
|
g_object_unref (mpeg_dec->adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,6 @@ struct _GstVdpMpegDecoder
|
||||||
VdpPictureInfoMPEG1Or2 vdp_info;
|
VdpPictureInfoMPEG1Or2 vdp_info;
|
||||||
GstBuffer *f_buffer;
|
GstBuffer *f_buffer;
|
||||||
GstBuffer *b_buffer;
|
GstBuffer *b_buffer;
|
||||||
|
|
||||||
GMutex *mutex;
|
|
||||||
|
|
||||||
gboolean broken_gop;
|
gboolean broken_gop;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue