From ea1b55428009778d6871c1a89d353cb8dc1645d2 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Wed, 15 May 2002 19:03:59 +0000 Subject: [PATCH] use new bytestream api. please test if you care about this plugin Original commit message from CVS: use new bytestream api. please test if you care about this plugin --- ext/cdparanoia/gstcdparanoia.c | 2 ++ gst/adder/gstadder.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ext/cdparanoia/gstcdparanoia.c b/ext/cdparanoia/gstcdparanoia.c index f50c14a539..d209f2d2c2 100644 --- a/ext/cdparanoia/gstcdparanoia.c +++ b/ext/cdparanoia/gstcdparanoia.c @@ -156,6 +156,8 @@ cdparanoia_class_init (CDParanoiaClass *klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; + char *success = strerror_tr[0]; + success = NULL; gobject_class = (GObjectClass*)klass; gstelement_class = (GstElementClass*)klass; diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 4081db907b..c982daecdb 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -373,8 +373,10 @@ gst_adder_loop (GstElement *element) GSList *inputs; GstAdderInputChannel *input; - gint8 *raw_in, *zero_out; + gint8 *zero_out; + guint8 *raw_in; guint32 waiting; + guint32 got_bytes; register guint i; g_return_if_fail (element != NULL); @@ -410,9 +412,10 @@ gst_adder_loop (GstElement *element) /* get data from the bytestream of each input channel. we need to check for events before passing on the data to the output buffer. */ - raw_in = gst_bytestream_peek_bytes (input->bytestream, GST_BUFFER_SIZE (buf_out)); + got_bytes = gst_bytestream_peek_bytes (input->bytestream, &raw_in, GST_BUFFER_SIZE (buf_out)); - if (raw_in == NULL) { + /* FIXME we should do something with the data if got_bytes is more than zero */ + if (got_bytes < GST_BUFFER_SIZE(buf_out)) { /* we need to check for an event. */ gst_bytestream_get_status (input->bytestream, &waiting, &event);