ext/ffmpeg/gstffmpegdec.c: Remove GST_STREAM_LOCK here, it is not needed any longer.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_sink_event):
Remove GST_STREAM_LOCK here, it is not needed any longer.
This commit is contained in:
Tim-Philipp Müller 2005-11-21 18:26:23 +00:00
parent 8bf6ddc9d0
commit 888d95d8bd
2 changed files with 12 additions and 25 deletions

View file

@ -1,3 +1,8 @@
2005-11-21 Tim-Philipp Müller <tim at centricular dot net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_sink_event):
Remove GST_STREAM_LOCK here, it is not needed any longer.
2005-11-16 Luca Ognibene <luogni@tin.it>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_get_buffer):

View file

@ -774,10 +774,10 @@ gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
GST_TIME_ARGS (ffmpegdec->synctime),
GST_TIME_ARGS (ffmpegdec->next_ts));
if (ffmpegdec->picture->opaque != NULL) {
outbuf = (GstBuffer *) ffmpegdec->picture->opaque;
gst_buffer_unref (outbuf);
}
if (ffmpegdec->picture->opaque != NULL) {
outbuf = (GstBuffer *) ffmpegdec->picture->opaque;
gst_buffer_unref (outbuf);
}
have_data = 0;
/* don´t break here! Timestamps are updated below */
@ -958,7 +958,6 @@ gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event)
GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) GST_OBJECT_PARENT (pad);
GstFFMpegDecClass *oclass =
(GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
gboolean unlock = FALSE;
gboolean ret;
GST_DEBUG_OBJECT (ffmpegdec, "Handling %s event",
@ -966,9 +965,6 @@ gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:{
GST_STREAM_LOCK (pad);
unlock = TRUE;
if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) {
gint have_data, len, try = 0;
@ -983,15 +979,7 @@ gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event)
}
break;
}
case GST_EVENT_TAG:{
GST_STREAM_LOCK (pad);
unlock = TRUE;
break;
}
case GST_EVENT_FLUSH_STOP:{
GST_STREAM_LOCK (pad);
unlock = TRUE;
if (ffmpegdec->opened) {
avcodec_flush_buffers (ffmpegdec->context);
}
@ -1002,9 +990,6 @@ gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event)
gdouble rate;
GstFormat fmt;
GST_STREAM_LOCK (pad);
unlock = TRUE;
gst_event_parse_newsegment (event, NULL, &rate, &fmt, &start, &end,
&base);
if (fmt == GST_FORMAT_TIME) {
@ -1049,9 +1034,6 @@ gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event)
ret = gst_pad_event_default (ffmpegdec->sinkpad, event);
if (unlock)
GST_STREAM_UNLOCK (pad);
return ret;
}