From 529c1bb0e31d151e060432c65f7f1879abc90452 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Fri, 17 Jan 2003 16:21:35 +0000 Subject: [PATCH] apply patch from vishnu Original commit message from CVS: apply patch from vishnu --- gst/mpegstream/gstmpegparse.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gst/mpegstream/gstmpegparse.c b/gst/mpegstream/gstmpegparse.c index 33328522c7..db8f339d79 100644 --- a/gst/mpegstream/gstmpegparse.c +++ b/gst/mpegstream/gstmpegparse.c @@ -343,9 +343,13 @@ gst_mpeg_parse_parse_packhead (GstMPEGParse *mpeg_parse, GstBuffer *buffer) scr |= (scr1 & 0x00fffe00) << 6; scr |= (scr1 & 0x000000ff) << 7; scr |= (scr2 & 0xfe000000) >> 25; - + buf += 5; - new_rate = (GUINT32_FROM_BE ((*(guint32 *) buf)) & 0x7ffffe00) >> 9; + /* we do this byte by byte because buf[3] might be outside of buf's + * memory space */ + new_rate = (buf[0] & 0x7f) << 15; + new_rate |= buf[1] << 7; + new_rate |= buf[2] >> 1; } scr_orig = scr;