summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorSteve Baker <steve@stevebaker.org>2002-05-15 19:07:21 +0000
committerSteve Baker <steve@stevebaker.org>2002-05-15 19:07:21 +0000
commit012aaa2cb0675d8c65e5d4f38f5b7e3f1975ac8a (patch)
treeb6619fa97d9cd6040151033679eba670cfb642d0 /gst
parent513dc268effebfccf820afb0cec37f87ac3017da (diff)
downloadgst-plugins-bad-012aaa2cb0675d8c65e5d4f38f5b7e3f1975ac8a.tar.gz
gst-plugins-bad-012aaa2cb0675d8c65e5d4f38f5b7e3f1975ac8a.tar.bz2
gst-plugins-bad-012aaa2cb0675d8c65e5d4f38f5b7e3f1975ac8a.zip
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
Diffstat (limited to 'gst')
-rw-r--r--gst/cdxaparse/gstcdxaparse.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gst/cdxaparse/gstcdxaparse.c b/gst/cdxaparse/gstcdxaparse.c
index b26ae051..27cf3a53 100644
--- a/gst/cdxaparse/gstcdxaparse.c
+++ b/gst/cdxaparse/gstcdxaparse.c
@@ -250,9 +250,10 @@ gst_cdxa_parse_loop (GstElement *element)
if (cdxa_parse->state == CDXA_PARSE_HEADER) {
guint32 fmt_size;
guint8 *buf;
+ guint32 got_bytes;
- header = (CDXAParseHeader *) gst_bytestream_peek_bytes (cdxa_parse->bs, 20);
- if (!header)
+ got_bytes = gst_bytestream_peek_bytes (cdxa_parse->bs, (guint8**)&header, 20);
+ if (got_bytes < 20)
return;
cdxa_parse->riff_size = GUINT32_FROM_LE (header->riff_size);
@@ -263,8 +264,8 @@ gst_cdxa_parse_loop (GstElement *element)
return;
/* get the data size */
- buf = gst_bytestream_peek_bytes (cdxa_parse->bs, 4);
- if (!buf)
+ got_bytes = gst_bytestream_peek_bytes (cdxa_parse->bs, (guint8**)&buf, 4);
+ if (got_bytes < 4)
return;
cdxa_parse->data_size = GUINT32_FROM_LE (*((guint32 *)buf));
@@ -282,9 +283,10 @@ gst_cdxa_parse_loop (GstElement *element)
else {
GstBuffer *buf;
GstBuffer *outbuf;
+ guint32 got_bytes;
- buf = gst_bytestream_read (cdxa_parse->bs, CDXA_SECTOR_SIZE);
- if (!buf) {
+ got_bytes = gst_bytestream_read (cdxa_parse->bs, &buf, CDXA_SECTOR_SIZE);
+ if (got_bytes < CDXA_SECTOR_SIZE) {
gst_cdxa_parse_handle_event (cdxa_parse);
return;
}