summaryrefslogtreecommitdiffstats
path: root/gst/qtdemux/qtdemux.c
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2003-08-26 20:19:44 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2003-08-26 20:19:44 +0000
commitc6a4e91afe03b2ff402e27f3edb5bf9b44de75b0 (patch)
tree7ebd04d1ab2b7b12a8f086c61f5b5cad6700f291 /gst/qtdemux/qtdemux.c
parent927a54f816229cab508618add6851c063bacfb9a (diff)
downloadgst-plugins-bad-c6a4e91afe03b2ff402e27f3edb5bf9b44de75b0.tar.gz
gst-plugins-bad-c6a4e91afe03b2ff402e27f3edb5bf9b44de75b0.tar.bz2
gst-plugins-bad-c6a4e91afe03b2ff402e27f3edb5bf9b44de75b0.zip
closes bug #119105
Original commit message from CVS: closes bug #119105
Diffstat (limited to 'gst/qtdemux/qtdemux.c')
-rw-r--r--gst/qtdemux/qtdemux.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 06aae979..fb3a538d 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -363,11 +363,13 @@ gst_qtp_read_bytes_atom_head(GstQTDemux * qtdemux,GstQtpAtom * atom)
GstByteStream * bs = qtdemux->bs;
GstQtpAtomMinHeader * amh = NULL;
guint64 * esize=NULL;
+ guint8 * ptr;
/* FIXME this can't be right, rewrite with _read */
do { /* do ... while (event()) is necessary for bytestream events */
if (!amh) {
- if (gst_bytestream_peek_bytes (bs, (guint8**)&amh, 8) == 8) {
+ if (gst_bytestream_peek_bytes (bs, &ptr, 8) == 8) {
+ amh = (GstQtpAtomMinHeader *)ptr;
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;
@@ -377,7 +379,8 @@ gst_qtp_read_bytes_atom_head(GstQTDemux * qtdemux,GstQtpAtom * atom)
}
if (amh) {
if (atom->size == 1) { /* need to peek extended size field */
- if (gst_bytestream_peek_bytes (bs, (guint8**)&esize, 8) == 8) {
+ if (gst_bytestream_peek_bytes (bs, &ptr, 8) == 8) {
+ esize = (guint64 *)ptr;
atom->size = GUINT64_FROM_BE(*esize);
gst_bytestream_flush (bs, 8);
qtdemux->bs_pos += 8;
@@ -394,11 +397,11 @@ gst_qtp_read_bytes_atom_head(GstQTDemux * qtdemux,GstQtpAtom * atom)
static void
gst_qtp_read_bytes(GstQTDemux * qtdemux, void * buffer, size_t size)
{
- void * data;
+ guint8 * data;
GstByteStream * bs = qtdemux->bs;
do {
- if (gst_bytestream_peek_bytes (bs, (guint8**)&data, size) == size) {
+ if (gst_bytestream_peek_bytes (bs, &data, size) == size) {
memcpy(buffer,data,size);
gst_bytestream_flush(bs,size);
qtdemux->bs_pos += size;