summaryrefslogtreecommitdiffstats
path: root/gst/qtdemux
diff options
context:
space:
mode:
authorSteve Baker <steve@stevebaker.org>2002-05-15 19:08:49 +0000
committerSteve Baker <steve@stevebaker.org>2002-05-15 19:08:49 +0000
commit9275ce0e157d95064ab6d5ea47f88c16df6598ec (patch)
tree4267d8b2597a0227fe8a60dbb6315c46fcf2183e /gst/qtdemux
parent012aaa2cb0675d8c65e5d4f38f5b7e3f1975ac8a (diff)
downloadgst-plugins-bad-9275ce0e157d95064ab6d5ea47f88c16df6598ec.tar.gz
gst-plugins-bad-9275ce0e157d95064ab6d5ea47f88c16df6598ec.tar.bz2
gst-plugins-bad-9275ce0e157d95064ab6d5ea47f88c16df6598ec.zip
use new bytestream api
Original commit message from CVS: use new bytestream api
Diffstat (limited to 'gst/qtdemux')
-rw-r--r--gst/qtdemux/qtdemux.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 31c3f2da..968ed1ab 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -362,7 +362,7 @@ gst_qtp_read_bytes_atom_head(GstQTDemux * qtdemux,GstQtpAtom * atom)
/* FIXME this can't be right, rewrite with _read */
do { /* do ... while (event()) is necessary for bytestream events */
if (!amh) {
- if ((amh = (GstQtpAtomMinHeader*) gst_bytestream_peek_bytes (bs, 8))) {
+ if (gst_bytestream_peek_bytes (bs, (guint8**)&amh, 8) == 8) {
atom->size = GUINT32_FROM_BE(amh->size);
atom->type = amh->type; /* don't need to turn this around magicly FIXME this can depend on endiannes */
atom->start = qtdemux->bs_pos;
@@ -372,7 +372,7 @@ gst_qtp_read_bytes_atom_head(GstQTDemux * qtdemux,GstQtpAtom * atom)
}
if (amh) {
if (atom->size == 1) { /* need to peek extended size field */
- if ((esize = (guint64*) gst_bytestream_peek_bytes (bs, 8))) {
+ if (gst_bytestream_peek_bytes (bs, (guint8**)&esize, 8) == 8) {
atom->size = GUINT64_FROM_BE(*esize);
gst_bytestream_flush (bs, 8);
qtdemux->bs_pos += 8;
@@ -391,8 +391,9 @@ gst_qtp_read_bytes(GstQTDemux * qtdemux, void * buffer, size_t size)
{
void * data;
GstByteStream * bs = qtdemux->bs;
+
do {
- if ((data = gst_bytestream_peek_bytes (bs,size))) {
+ if (gst_bytestream_peek_bytes (bs, (guint8**)&data, size) == size) {
memcpy(buffer,data,size);
gst_bytestream_flush(bs,size);
qtdemux->bs_pos += size;
@@ -407,7 +408,7 @@ gst_qtp_read(GstQTDemux * qtdemux, size_t size)
GstBuffer * buf;
GstByteStream * bs = qtdemux->bs;
do {
- if ((buf = gst_bytestream_read (bs,size))) {
+ if (gst_bytestream_read (bs, &buf, size) == size) {
qtdemux->bs_pos += size;
return buf;
}