Commit 3e5febcd authored by Wim Taymans's avatar Wim Taymans
Browse files

gst/: Don't ignore _push() return values.

Original commit message from CVS:
* gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_chain),
(gst_audio_convert_caps_remove_format_info),
(gst_audio_convert_setcaps), (gst_audio_convert_fixate),
(gst_audio_convert_change_state), (gst_audio_convert_channels):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_videotestsrc_src_negotiate), (gst_videotestsrc_src_link),
(gst_videotestsrc_parse_caps), (gst_videotestsrc_src_accept_caps),
(gst_videotestsrc_setcaps), (gst_videotestsrc_activate),
(gst_videotestsrc_init), (gst_videotestsrc_loop):
Don't ignore _push() return values.
Make sure no processing is done when shutting down.
Videotestsrc pad activation fix.
parent 80d4778b
2005-05-05 Wim Taymans <wim@fluendo.com>
* gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_chain),
(gst_audio_convert_caps_remove_format_info),
(gst_audio_convert_setcaps), (gst_audio_convert_fixate),
(gst_audio_convert_change_state), (gst_audio_convert_channels):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_videotestsrc_src_negotiate), (gst_videotestsrc_src_link),
(gst_videotestsrc_parse_caps), (gst_videotestsrc_src_accept_caps),
(gst_videotestsrc_setcaps), (gst_videotestsrc_activate),
(gst_videotestsrc_init), (gst_videotestsrc_loop):
Don't ignore _push() return values.
Make sure no processing is done when shutting down.
Videotestsrc pad activation fix.
2005-05-05 Wim Taymans <wim@fluendo.com> 2005-05-05 Wim Taymans <wim@fluendo.com>
   
* gst/adder/Makefile.am: * gst/adder/Makefile.am:
......
...@@ -231,6 +231,7 @@ static GstFlowReturn ...@@ -231,6 +231,7 @@ static GstFlowReturn
gst_audio_convert_chain (GstPad * pad, GstBuffer * buf) gst_audio_convert_chain (GstPad * pad, GstBuffer * buf)
{ {
GstAudioConvert *this; GstAudioConvert *this;
GstFlowReturn ret;
this = GST_AUDIO_CONVERT (GST_OBJECT_PARENT (pad)); this = GST_AUDIO_CONVERT (GST_OBJECT_PARENT (pad));
...@@ -257,14 +258,17 @@ gst_audio_convert_chain (GstPad * pad, GstBuffer * buf) ...@@ -257,14 +258,17 @@ gst_audio_convert_chain (GstPad * pad, GstBuffer * buf)
* - convert rate and channels * - convert rate and channels
* - convert back to output format * - convert back to output format
*/ */
GST_STREAM_LOCK (pad);
buf = gst_audio_convert_buffer_to_default_format (this, buf); buf = gst_audio_convert_buffer_to_default_format (this, buf);
buf = gst_audio_convert_channels (this, buf); buf = gst_audio_convert_channels (this, buf);
buf = gst_audio_convert_buffer_from_default_format (this, buf); buf = gst_audio_convert_buffer_from_default_format (this, buf);
return gst_pad_push (this->src, buf); ret = gst_pad_push (this->src, buf);
GST_STREAM_UNLOCK (pad);
return ret;
} }
static GstCaps * static GstCaps *
...@@ -609,8 +613,10 @@ gst_audio_convert_change_state (GstElement * element) ...@@ -609,8 +613,10 @@ gst_audio_convert_change_state (GstElement * element)
switch (GST_STATE_TRANSITION (element)) { switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_PAUSED_TO_READY: case GST_STATE_PAUSED_TO_READY:
GST_STREAM_LOCK (this->sink);
this->convert_internal = NULL; this->convert_internal = NULL;
gst_audio_convert_unset_matrix (this); gst_audio_convert_unset_matrix (this);
GST_STREAM_UNLOCK (this->sink);
break; break;
default: default:
break; break;
......
...@@ -342,6 +342,9 @@ gst_videotestsrc_activate (GstPad * pad, GstActivateMode mode) ...@@ -342,6 +342,9 @@ gst_videotestsrc_activate (GstPad * pad, GstActivateMode mode)
result = TRUE; result = TRUE;
break; break;
default:
result = FALSE;
break;
} }
return result; return result;
} }
...@@ -676,7 +679,9 @@ gst_videotestsrc_loop (GstPad * pad) ...@@ -676,7 +679,9 @@ gst_videotestsrc_loop (GstPad * pad)
videotestsrc->n_frames++; videotestsrc->n_frames++;
videotestsrc->running_time += GST_BUFFER_DURATION (outbuf); videotestsrc->running_time += GST_BUFFER_DURATION (outbuf);
gst_pad_push (pad, outbuf); if (gst_pad_push (pad, outbuf) != GST_FLOW_OK)
goto need_pause;
return; return;
need_pause: need_pause:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment