diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-04-07 20:10:44 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-04-07 20:10:44 +0000 |
commit | d89da92ccf5f61c84280ab1f64ba22d9d39b3c4b (patch) | |
tree | 6b216e07bd59bab6688feccb6f00dc679046f394 /gst | |
parent | f602f13faa853f17f4329dcb31e2261aa2369a7f (diff) | |
download | gst-plugins-bad-d89da92ccf5f61c84280ab1f64ba22d9d39b3c4b.tar.gz gst-plugins-bad-d89da92ccf5f61c84280ab1f64ba22d9d39b3c4b.tar.bz2 gst-plugins-bad-d89da92ccf5f61c84280ab1f64ba22d9d39b3c4b.zip |
Fixes #109700
Original commit message from CVS:
Fixes #109700
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mpeg1sys/buffer.c | 8 | ||||
-rw-r--r-- | gst/mpeg1videoparse/gstmp1videoparse.c | 6 | ||||
-rw-r--r-- | gst/mpegaudioparse/gstmpegaudioparse.c | 14 |
3 files changed, 14 insertions, 14 deletions
diff --git a/gst/mpeg1sys/buffer.c b/gst/mpeg1sys/buffer.c index badf674d..158bdb5d 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; diff --git a/gst/mpeg1videoparse/gstmp1videoparse.c b/gst/mpeg1videoparse/gstmp1videoparse.c index c73d6d1b..c3e6fa56 100644 --- a/gst/mpeg1videoparse/gstmp1videoparse.c +++ b/gst/mpeg1videoparse/gstmp1videoparse.c @@ -241,7 +241,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP gint sync_state; gboolean have_sync; guchar sync_byte; - gulong head; + guint32 head; gint sync_pos; guint64 time_stamp; GstBuffer *temp; @@ -278,9 +278,9 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP GST_DEBUG (0,"mp1videoparse: received buffer of %ld bytes %lld",size, GST_BUFFER_TIMESTAMP(buf)); - head = GULONG_FROM_BE(*((gulong *)data)); + head = GUINT32_FROM_BE(*((guint32 *)data)); - GST_DEBUG (0,"mp1videoparse: head is %08lx", head); + GST_DEBUG (0,"mp1videoparse: head is %08x", (unsigned int)head); if (!mp1videoparse_valid_sync(head) || mp1videoparse->need_resync) { sync_pos = mp1videoparse_find_next_gop(mp1videoparse, mp1videoparse->partialbuf); diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c index f78415f1..4d0cf3a4 100644 --- a/gst/mpegaudioparse/gstmpegaudioparse.c +++ b/gst/mpegaudioparse/gstmpegaudioparse.c @@ -202,7 +202,7 @@ fprintf(stderr, "have buffer of %d bytes\n",size); while (offset < (size - 4)) { start = gst_mp3parse_next_header (data,size,offset); fprintf(stderr, "skipped %d bytes searching for the next header\n",start-offset); - header = GULONG_FROM_BE(*((guint32 *)(data+start))); + header = GUINT32_FROM_BE(*((guint32 *)(data+start))); fprintf(stderr, "header is 0x%08x\n",header); /* figure out how big the frame is supposed to be */ @@ -231,7 +231,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf) GstMPEGAudioParse *mp3parse; guchar *data; glong size,offset = 0; - unsigned long header; + guint32 header; int bpf; GstBuffer *outbuf; guint64 last_ts; @@ -282,7 +282,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf) GST_DEBUG (0,"mp3parse: **** now at %ld skipped %d bytes",offset,skipped); } /* construct the header word */ - header = GULONG_FROM_BE(*((gulong *)(data+offset))); + header = GUINT32_FROM_BE(*((guint32 *)(data+offset))); /* if it's a valid header, go ahead and send off the frame */ if (head_check(header)) { /* calculate the bpf of the frame */ @@ -301,17 +301,17 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf) * the frames are not independently coded. ********************************************************************************/ if ( mp3parse->in_flush ) { - unsigned long header2; + guint32 header2; if ((size-offset)<(bpf+4)) { if (mp3parse->in_flush) break; } /* wait until we have the the entire current frame as well as the next frame header */ - header2 = GULONG_FROM_BE(*((gulong *)(data+offset+bpf))); - GST_DEBUG(0,"mp3parse: header=%08lX, header2=%08lX, bpf=%d", header, header2, bpf ); + header2 = GUINT32_FROM_BE(*((guint32 *)(data+offset+bpf))); + GST_DEBUG(0,"mp3parse: header=%08X, header2=%08X, bpf=%d", (unsigned int)header, (unsigned int)header2, bpf ); #define HDRMASK ~( (0xF<<12)/*bitrate*/ | (1<<9)/*padding*/ | (3<<4)/*mode extension*/ ) /* mask the bits which are allowed to differ between frames */ if ( (header2&HDRMASK) != (header&HDRMASK) ) { /* require 2 matching headers in a row */ - GST_DEBUG(0,"mp3parse: next header doesn't match (header=%08lX, header2=%08lX, bpf=%d)", header, header2, bpf ); + GST_DEBUG(0,"mp3parse: next header doesn't match (header=%08X, header2=%08X, bpf=%d)", (unsigned int)header, (unsigned int)header2, bpf ); offset++; /* This frame is invalid. Start looking for a valid frame at the next position in the stream */ continue; } |