summaryrefslogtreecommitdiffstats
path: root/ext/gsm/gstgsmdec.c
diff options
context:
space:
mode:
authorZeeshan Ali <zeenix@gmail.com>2005-10-26 15:45:11 +0000
committerZeeshan Ali <zeenix@gmail.com>2005-10-26 15:45:11 +0000
commit72818f871d003b3b08ee75fcf59c03d1de608a99 (patch)
tree3c1f7d58beb8c71bef1a0b1e067391dba0ea6163 /ext/gsm/gstgsmdec.c
parentd6f4ad6163568ee4b77e3056a6277575951a2f5e (diff)
downloadgst-plugins-bad-72818f871d003b3b08ee75fcf59c03d1de608a99.tar.gz
gst-plugins-bad-72818f871d003b3b08ee75fcf59c03d1de608a99.tar.bz2
gst-plugins-bad-72818f871d003b3b08ee75fcf59c03d1de608a99.zip
Fixing stuff as wingo pointed out.
Original commit message from CVS: Fixing stuff as wingo pointed out.
Diffstat (limited to 'ext/gsm/gstgsmdec.c')
-rw-r--r--ext/gsm/gstgsmdec.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/ext/gsm/gstgsmdec.c b/ext/gsm/gstgsmdec.c
index c2ff695d..6475a779 100644
--- a/ext/gsm/gstgsmdec.c
+++ b/ext/gsm/gstgsmdec.c
@@ -1,6 +1,6 @@
/*
* Farsight
- * GStreamer GSM decoder
+ * GStreamer GSM encoder
* Copyright (C) 2005 Philippe Khalaf <burger@speedy.org>
*
* This library is free software; you can redistribute it and/or
@@ -157,13 +157,9 @@ gst_gsmdec_chain (GstPad * pad, GstBuffer * buf)
{
GstGSMDec *gsmdec;
gsm_byte *data;
-
- g_return_val_if_fail (GST_IS_PAD (pad), GST_FLOW_ERROR);
+ GstFlowReturn ret = GST_FLOW_OK;
gsmdec = GST_GSMDEC (gst_pad_get_parent (pad));
- g_return_val_if_fail (GST_IS_GSMDEC (gsmdec), GST_FLOW_ERROR);
-
- g_return_val_if_fail (GST_PAD_IS_LINKED (gsmdec->srcpad), GST_FLOW_ERROR);
// do we have enough bytes to read a header
if (GST_BUFFER_SIZE (buf) >= 33) {
@@ -196,10 +192,11 @@ gst_gsmdec_chain (GstPad * pad, GstBuffer * buf)
GST_BUFFER_SIZE (outbuf),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)));
//gst_util_dump_mem (GST_BUFFER_DATA(outbuf), GST_BUFFER_SIZE (outbuf));
- gst_pad_push (gsmdec->srcpad, outbuf);
+ ret = gst_pad_push (gsmdec->srcpad, outbuf);
}
gst_buffer_unref (buf);
+ gst_object_unref (gsmdec);
- return GST_FLOW_OK;
+ return ret;
}