Add checks to GST_FLOW_NOT_LINKED for values returned from gst_pad_push.

Original commit message from CVS:
Add checks to GST_FLOW_NOT_LINKED for values returned from gst_pad_push.
This commit is contained in:
Edgard Lima 2005-10-31 14:41:31 +00:00
parent 6662f94650
commit 7d5d482411
2 changed files with 19 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2005-10-31 Edgard Lima <edgard.lima@indt.org.br>
* ext/speex/gstspeexenc.c: (gst_speexenc_chain)
Add checks to GST_FLOW_NOT_LINKED for values returned
from gst_pad_push.
2005-10-31 Zeeshan Ali <zeenix@gmail.com>
* gst/rtp/gstrtpg711dec.c: (gst_rtpg711dec_setcaps),

View file

@ -940,12 +940,17 @@ gst_speexenc_chain (GstPad * pad, GstBuffer * buf)
gst_buffer_set_caps (buf2, caps);
/* push out buffers */
if (GST_FLOW_OK != (ret = gst_speexenc_push_buffer (speexenc, buf1))) {
ret = gst_speexenc_push_buffer (speexenc, buf1);
if ((GST_FLOW_OK != ret) && (GST_FLOW_NOT_LINKED != ret)) {
gst_buffer_unref (buf1);
goto error;
}
if (GST_FLOW_OK != (ret = gst_speexenc_push_buffer (speexenc, buf2))) {
ret = gst_speexenc_push_buffer (speexenc, buf2);
if ((GST_FLOW_OK != ret) && (GST_FLOW_NOT_LINKED != ret)) {
gst_buffer_unref (buf2);
goto error;
}
@ -995,7 +1000,7 @@ gst_speexenc_chain (GstPad * pad, GstBuffer * buf)
GST_BUFFER_OFFSET_NONE, outsize, GST_PAD_CAPS (speexenc->srcpad),
&outbuf);
if (GST_FLOW_OK != ret) {
if ((GST_FLOW_OK != ret)) {
goto error;
}
@ -1012,10 +1017,11 @@ gst_speexenc_chain (GstPad * pad, GstBuffer * buf)
GST_BUFFER_OFFSET_END (outbuf) =
speexenc->frameno * frame_size - speexenc->lookahead;
if (GST_FLOW_OK != (ret = gst_speexenc_push_buffer (speexenc, outbuf))) {
printf ("ret = %d\n", ret);
// gst_buffer_unref(outbuf);
// goto error;
ret = gst_speexenc_push_buffer (speexenc, outbuf);
if ((GST_FLOW_OK != ret) && (GST_FLOW_NOT_LINKED != ret)) {
gst_buffer_unref (outbuf);
goto error;
}
}
}