Commit 7d5d4824 authored by Edgard Gusmão Lima's avatar Edgard Gusmão Lima
Browse files

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.
parent 6662f946
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),
......
......@@ -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;
}
}
}
......
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