diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ext/gsm/gstgsm.c | 3 | ||||
-rw-r--r-- | ext/gsm/gstgsmdec.c | 13 | ||||
-rw-r--r-- | ext/gsm/gstgsmdec.h | 6 | ||||
-rw-r--r-- | ext/gsm/gstgsmenc.c | 14 |
5 files changed, 23 insertions, 22 deletions
@@ -1,3 +1,12 @@ +2005-10-26 Zeeshan Ali <zeenix@gmail.com> + + * ext/gsm/gstgsm.c: + * ext/gsm/gstgsmdec.c: (gst_gsmdec_init), (gst_gsmdec_chain): + * ext/gsm/gstgsmdec.h: + * ext/gsm/gstgsmenc.c: (gst_gsmenc_class_init), (gst_gsmenc_init), + (gst_gsmenc_chain): + Fixing stuff as wingo pointed out. + 2005-10-25 Zeeshan Ali <zeenix@gmail.com> * ext/gsm/gstgsm.c: (plugin_init): diff --git a/ext/gsm/gstgsm.c b/ext/gsm/gstgsm.c index 60140716..c64d867c 100644 --- a/ext/gsm/gstgsm.c +++ b/ext/gsm/gstgsm.c @@ -41,4 +41,5 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, "gsm", "GSM encoder/decoder", - plugin_init, VERSION, "LGPL", "Farsight", "http://farsight.sf.net") + plugin_init, + VERSION, "LGPL", "Gstreamer", "http://gstreamer.freedesktop.org") 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; } diff --git a/ext/gsm/gstgsmdec.h b/ext/gsm/gstgsmdec.h index b8767c74..1718e74b 100644 --- a/ext/gsm/gstgsmdec.h +++ b/ext/gsm/gstgsmdec.h @@ -1,7 +1,5 @@ -/* - * Farsight - * GStreamer GSM decoder (uses WAV49 compiled libgsm) - * Copyright (C) 2005 Philippe Khalaf <burger@speedy.org> +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public diff --git a/ext/gsm/gstgsmenc.c b/ext/gsm/gstgsmenc.c index c4a39e46..2ecbefc7 100644 --- a/ext/gsm/gstgsmenc.c +++ b/ext/gsm/gstgsmenc.c @@ -158,18 +158,12 @@ gst_gsmenc_chain (GstPad * pad, GstBuffer * buf) { GstGSMEnc *gsmenc; gsm_signal *data; - - g_return_val_if_fail (GST_IS_PAD (pad), GST_FLOW_ERROR); + GstFlowReturn ret = GST_FLOW_OK; gsmenc = GST_GSMENC (gst_pad_get_parent (pad)); - g_return_val_if_fail (GST_IS_GSMENC (gsmenc), GST_FLOW_ERROR); - - g_return_val_if_fail (GST_PAD_IS_LINKED (gsmenc->srcpad), GST_FLOW_ERROR); - gst_adapter_push (gsmenc->adapter, buf); while (gst_adapter_available (gsmenc->adapter) >= 320) { - GstBuffer *outbuf; outbuf = gst_buffer_new_and_alloc (33 * sizeof (gsm_byte)); @@ -185,8 +179,10 @@ gst_gsmenc_chain (GstPad * pad, GstBuffer * buf) gst_buffer_set_caps (outbuf, gst_pad_get_caps (gsmenc->srcpad)); GST_DEBUG ("Pushing buffer of size %d", GST_BUFFER_SIZE (outbuf)); //gst_util_dump_mem (GST_BUFFER_DATA(outbuf), GST_BUFFER_SIZE (outbuf)); - gst_pad_push (gsmenc->srcpad, outbuf); + ret = gst_pad_push (gsmenc->srcpad, outbuf); } - return GST_FLOW_OK; + gst_object_unref (gsmenc); + + return ret; } |