gst/ffmpegcolorspace/gstffmpegcolorspace.c: No need to take the STREAM lock anymore.

Original commit message from CVS:
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
(gst_ffmpegcsp_getcaps), (gst_ffmpegcsp_configure_context),
(gst_ffmpegcsp_setcaps), (gst_ffmpegcsp_bufferalloc),
(gst_ffmpegcsp_chain), (gst_ffmpegcsp_change_state):
No need to take the STREAM lock anymore.
This commit is contained in:
Wim Taymans 2005-05-25 12:07:04 +00:00
parent 2bed7c60aa
commit bd8af68852
2 changed files with 8 additions and 7 deletions

View file

@ -1,3 +1,11 @@
2005-05-25 Wim Taymans <wim@fluendo.com>
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
(gst_ffmpegcsp_getcaps), (gst_ffmpegcsp_configure_context),
(gst_ffmpegcsp_setcaps), (gst_ffmpegcsp_bufferalloc),
(gst_ffmpegcsp_chain), (gst_ffmpegcsp_change_state):
No need to take the STREAM lock anymore.
2005-05-25 Wim Taymans <wim@fluendo.com> 2005-05-25 Wim Taymans <wim@fluendo.com>
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_dispose), * ext/ogg/gstoggdemux.c: (gst_ogg_pad_dispose),

View file

@ -412,8 +412,6 @@ gst_ffmpegcsp_chain (GstPad * pad, GstBuffer * buffer)
space = GST_FFMPEGCSP (GST_PAD_PARENT (pad)); space = GST_FFMPEGCSP (GST_PAD_PARENT (pad));
GST_STREAM_LOCK (pad);
GST_DEBUG ("from %d -> to %d", space->from_pixfmt, space->to_pixfmt); GST_DEBUG ("from %d -> to %d", space->from_pixfmt, space->to_pixfmt);
if (space->from_pixfmt == PIX_FMT_NB || space->to_pixfmt == PIX_FMT_NB) if (space->from_pixfmt == PIX_FMT_NB || space->to_pixfmt == PIX_FMT_NB)
goto unkown_format; goto unkown_format;
@ -460,20 +458,17 @@ gst_ffmpegcsp_chain (GstPad * pad, GstBuffer * buffer)
} }
res = gst_pad_push (space->srcpad, outbuf); res = gst_pad_push (space->srcpad, outbuf);
GST_STREAM_UNLOCK (pad);
return res; return res;
/* ERRORS */ /* ERRORS */
no_buffer: no_buffer:
{ {
GST_STREAM_UNLOCK (pad);
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
} }
unkown_format: unkown_format:
{ {
GST_STREAM_UNLOCK (pad);
GST_ELEMENT_ERROR (space, CORE, NOT_IMPLEMENTED, (NULL), GST_ELEMENT_ERROR (space, CORE, NOT_IMPLEMENTED, (NULL),
("attempting to convert colorspaces between unknown formats")); ("attempting to convert colorspaces between unknown formats"));
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
@ -500,11 +495,9 @@ gst_ffmpegcsp_change_state (GstElement * element)
switch (transition) { switch (transition) {
case GST_STATE_PAUSED_TO_READY: case GST_STATE_PAUSED_TO_READY:
GST_STREAM_LOCK (space->sinkpad);
if (space->palette) if (space->palette)
av_free (space->palette); av_free (space->palette);
space->palette = NULL; space->palette = NULL;
GST_STREAM_UNLOCK (space->sinkpad);
break; break;
default: default:
break; break;