summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/cdxaparse/gstcdxaparse.c4
-rw-r--r--gst/qtdemux/qtdemux.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/gst/cdxaparse/gstcdxaparse.c b/gst/cdxaparse/gstcdxaparse.c
index 842d8e29..2154aa54 100644
--- a/gst/cdxaparse/gstcdxaparse.c
+++ b/gst/cdxaparse/gstcdxaparse.c
@@ -242,6 +242,7 @@ gst_cdxa_parse_loop (GstElement *element)
{
GstCDXAParse *cdxa_parse;
CDXAParseHeader *header;
+ guint8 *headerdata;
g_return_if_fail (element != NULL);
g_return_if_fail (GST_IS_CDXA_PARSE (element));
@@ -253,7 +254,8 @@ gst_cdxa_parse_loop (GstElement *element)
guint8 *buf;
guint32 got_bytes;
- got_bytes = gst_bytestream_peek_bytes (cdxa_parse->bs, (guint8**)&header, 20);
+ got_bytes = gst_bytestream_peek_bytes (cdxa_parse->bs, &headerdata, 20);
+ header = (CDXAParseHeader *) headerdata;
if (got_bytes < 20)
return;
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;