diff options
author | David Schleef <ds@schleef.org> | 2003-04-07 18:43:25 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2003-04-07 18:43:25 +0000 |
commit | bb23b9a3a243290b6feabbe8c745fef97a06ea33 (patch) | |
tree | 75f1ca4b0ce5d0b6aa9a81e28b3ee79602c12764 /gst/mpeg1sys/buffer.c | |
parent | 6b32ca5b1a9e4e715dbcb17416f97f9c0a592146 (diff) | |
download | gst-plugins-bad-bb23b9a3a243290b6feabbe8c745fef97a06ea33.tar.gz gst-plugins-bad-bb23b9a3a243290b6feabbe8c745fef97a06ea33.tar.bz2 gst-plugins-bad-bb23b9a3a243290b6feabbe8c745fef97a06ea33.zip |
Fix a bunch of endianness conversions that were done as long instead of int32. Should go into 0.6.1.
Original commit message from CVS:
Fix a bunch of endianness conversions that were done as long instead of
int32. Should go into 0.6.1.
Diffstat (limited to 'gst/mpeg1sys/buffer.c')
-rw-r--r-- | gst/mpeg1sys/buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/mpeg1sys/buffer.c b/gst/mpeg1sys/buffer.c index be4d4f3f..6554f03f 100644 --- a/gst/mpeg1sys/buffer.c +++ b/gst/mpeg1sys/buffer.c @@ -353,7 +353,7 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) { static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) { guchar *data = mb->buffer; gulong offset = mb->scan_pos; - gulong id=0; + guint32 id=0; guint padding_bit; gst_getbits_t gb; guint startup_delay = 0; @@ -364,9 +364,9 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) { GST_DEBUG (0,"mpeg1mux::update_audio_info %lu %lu", mb->base, mb->scan_pos); if (mb->base == 0 && mb->scan_pos == 0) { - id = GULONG_FROM_BE(*((gulong *)(data))); + id = GUINT32_FROM_BE(*((guint32 *)(data))); - printf("MPEG audio id = %08lx\n", id); + printf("MPEG audio id = %08x\n", (unsigned int)id); if ((id & 0xfff00000) == AUDIO_SYNCWORD<<20) { /* mpegver = (header >> 19) & 0x3; don't need this for bpf */ @@ -442,7 +442,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) { } } while (offset < mb->length-4) { - id = GULONG_FROM_BE(*((gulong *)(data+offset))); + id = GUINT32_FROM_BE(*((guint32 *)(data+offset))); /* mpegver = (header >> 19) & 0x3; don't need this for bpf */ layer_index = (id >> 17) & 0x3; |