diff -r -u -b xine-lib-1-rc7-orig/src/demuxers/demux_mpeg.c xine-lib-1-rc7/src/demuxers/demux_mpeg.c --- xine-lib-1-rc7-orig/src/demuxers/demux_mpeg.c 2004-10-30 02:28:47.000000000 +0300 +++ xine-lib-1-rc7/src/demuxers/demux_mpeg.c 2004-11-22 17:08:22.000000000 +0200 @@ -263,7 +263,7 @@ if ((flags & 0x80) == 0x80) { w = read_bytes(this, 1); - pts = (w & 0x0e) << 29 ; + pts = (int64_t)(w & 0x0e) << 29 ; w = read_bytes(this, 2); pts |= (w & 0xFFFE) << 14; w = read_bytes(this, 2); @@ -422,7 +422,7 @@ if ((flags & 0x80) == 0x80) { w = read_bytes(this, 1); - pts = (w & 0x0e) << 29 ; + pts = (int64_t)(w & 0x0e) << 29 ; w = read_bytes(this, 2); pts |= (w & 0xFFFE) << 14; w = read_bytes(this, 2); @@ -480,7 +480,7 @@ if ((flags & 0x80) == 0x80) { w = read_bytes(this, 1); - pts = (w & 0x0e) << 29 ; + pts = (int64_t)(w & 0x0e) << 29 ; w = read_bytes(this, 2); pts |= (w & 0xFFFE) << 14; w = read_bytes(this, 2); @@ -492,7 +492,7 @@ if ((flags & 0x40) == 0x40) { w = read_bytes(this, 1); - dts = (w & 0x0e) << 29 ; + dts = (int64_t)(w & 0x0e) << 29 ; w = read_bytes(this, 2); dts |= (w & 0xFFFE) << 14; w = read_bytes(this, 2); @@ -583,7 +583,7 @@ if (this->status != DEMUX_OK) return; - pts = (w & 0xe) << 29 ; + pts = (int64_t)(w & 0xe) << 29 ; w = read_bytes(this, 2); len -= 2; pts |= (w & 0xFFFE) << 14; @@ -598,7 +598,7 @@ if (this->status != DEMUX_OK) return; - pts = (w & 0x0e) << 29 ; + pts = (int64_t)(w & 0x0e) << 29 ; w = read_bytes(this, 2); len -= 2; pts |= (w & 0xFFFE) << 14; @@ -608,7 +608,7 @@ pts |= (w & 0xFFFE) >> 1; w = read_bytes(this, 1); len -= 1; - dts = (w & 0x0e) << 29 ; + dts = (int64_t)(w & 0x0e) << 29 ; w = read_bytes(this, 2); len -= 2; dts |= (w & 0xFFFE) << 14; w = read_bytes(this, 2); len -= 2; @@ -727,7 +727,7 @@ /* system_clock_reference */ - scr = (buf & 0x38) << 27; + scr = (int64_t)(buf & 0x38) << 27; scr |= (buf & 0x03) << 28; buf = read_bytes (this, 1); scr |= buf << 20; @@ -765,7 +765,7 @@ /* system_clock_reference */ - scr = (buf & 0x2) << 30; + scr = (int64_t)(buf & 0x2) << 30; buf = read_bytes (this, 2); scr |= (buf & 0xFFFE) << 14; buf = read_bytes (this, 2); Only in xine-lib-1-rc7/src/demuxers: demux_mpeg_block.bak diff -r -u -b xine-lib-1-rc7-orig/src/demuxers/demux_mpeg_block.c xine-lib-1-rc7/src/demuxers/demux_mpeg_block.c --- xine-lib-1-rc7-orig/src/demuxers/demux_mpeg_block.c 2004-08-12 13:04:10.000000000 +0300 +++ xine-lib-1-rc7/src/demuxers/demux_mpeg_block.c 2004-11-22 17:34:50.000000000 +0200 @@ -421,7 +421,7 @@ if (this->mpeg1) { /* system_clock_reference */ - this->scr = (p[4] & 0x02) << 30; + this->scr = (int64_t)(p[4] & 0x02) << 30; this->scr |= (p[5] & 0xFF) << 22; this->scr |= (p[6] & 0xFE) << 14; this->scr |= (p[7] & 0xFF) << 7; @@ -445,7 +445,7 @@ /* system_clock_reference */ - this->scr = (p[4] & 0x08) << 27 ; + this->scr = (int64_t)(p[4] & 0x08) << 27 ; this->scr |= (p[4] & 0x03) << 28 ; this->scr |= p[5] << 20; this->scr |= (p[6] & 0xF8) << 12 ; @@ -489,12 +489,12 @@ /* NAV Packet */ this->packet_len = p[4] << 8 | p[5]; - start_pts = (p[7+12] << 24); + start_pts = ((int64_t)p[7+12] << 24); start_pts |= (p[7+13] << 16); start_pts |= (p[7+14] << 8); start_pts |= p[7+15]; - end_pts = (p[7+16] << 24); + end_pts = ((int64_t)p[7+16] << 24); end_pts |= (p[7+17] << 16); end_pts |= (p[7+18] << 8); end_pts |= p[7+19]; @@ -598,7 +598,7 @@ this->dts = 0; if ((p[0] & 0xf0) == 0x20) { - this->pts = (p[ 0] & 0x0E) << 29 ; + this->pts = (int64_t)(p[ 0] & 0x0E) << 29 ; this->pts |= p[ 1] << 22 ; this->pts |= (p[ 2] & 0xFE) << 14 ; this->pts |= p[ 3] << 7 ; @@ -608,13 +608,13 @@ this->packet_len -=5; return header_len; } else if ((p[0] & 0xf0) == 0x30) { - this->pts = (p[ 0] & 0x0E) << 29 ; + this->pts = (int64_t)(p[ 0] & 0x0E) << 29 ; this->pts |= p[ 1] << 22 ; this->pts |= (p[ 2] & 0xFE) << 14 ; this->pts |= p[ 3] << 7 ; this->pts |= (p[ 4] & 0xFE) >> 1 ; - this->dts = (p[ 5] & 0x0E) << 29 ; + this->dts = (int64_t)(p[ 5] & 0x0E) << 29 ; this->dts |= p[ 6] << 22 ; this->dts |= (p[ 7] & 0xFE) << 14 ; this->dts |= p[ 8] << 7 ; @@ -657,7 +657,7 @@ if (p[7] & 0x80) { /* pts avail */ - this->pts = (p[ 9] & 0x0E) << 29 ; + this->pts = (int64_t)(p[ 9] & 0x0E) << 29 ; this->pts |= p[10] << 22 ; this->pts |= (p[11] & 0xFE) << 14 ; this->pts |= p[12] << 7 ; @@ -670,7 +670,7 @@ if (p[7] & 0x40) { /* dts avail */ - this->dts = (p[14] & 0x0E) << 29 ; + this->dts = (int64_t)(p[14] & 0x0E) << 29 ; this->dts |= p[15] << 22 ; this->dts |= (p[16] & 0xFE) << 14 ; this->dts |= p[17] << 7 ; @@ -1111,7 +1111,7 @@ } if ( ((p[0] & 0xf0) == 0x20) || ((p[0] & 0xf0) == 0x30) ) { - pts = (p[ 0] & 0x0E) << 29 ; + pts = (int64_t)(p[ 0] & 0x0E) << 29 ; pts |= p[ 1] << 22 ; pts |= (p[ 2] & 0xFE) << 14 ; pts |= p[ 3] << 7 ; @@ -1122,7 +1122,7 @@ if (p[7] & 0x80) { /* pts avail */ - pts = (p[ 9] & 0x0E) << 29 ; + pts = (int64_t)(p[ 9] & 0x0E) << 29 ; pts |= p[10] << 22 ; pts |= (p[11] & 0xFE) << 14 ; pts |= p[12] << 7 ; Only in xine-lib-1-rc7/src/demuxers: demux_mpeg_pes.bak diff -r -u -b xine-lib-1-rc7-orig/src/demuxers/demux_mpeg_pes.c xine-lib-1-rc7/src/demuxers/demux_mpeg_pes.c --- xine-lib-1-rc7-orig/src/demuxers/demux_mpeg_pes.c 2004-08-12 13:04:10.000000000 +0300 +++ xine-lib-1-rc7/src/demuxers/demux_mpeg_pes.c 2004-11-22 17:34:08.000000000 +0200 @@ -476,7 +476,7 @@ if (this->mpeg1) { /* system_clock_reference */ - this->scr = (p[4] & 0x02) << 30; + this->scr = (int64_t)(p[4] & 0x02) << 30; this->scr |= (p[5] & 0xFF) << 22; this->scr |= (p[6] & 0xFE) << 14; this->scr |= (p[7] & 0xFF) << 7; @@ -501,7 +501,7 @@ /* system_clock_reference */ - this->scr = (p[4] & 0x08) << 27 ; + this->scr = (int64_t)(p[4] & 0x08) << 27 ; this->scr |= (p[4] & 0x03) << 28 ; this->scr |= p[5] << 20; this->scr |= (p[6] & 0xF8) << 12 ; @@ -555,12 +555,12 @@ /* NAV Packet */ - start_pts = (p[7+12] << 24); + start_pts = ((int64_t)p[7+12] << 24); start_pts |= (p[7+13] << 16); start_pts |= (p[7+14] << 8); start_pts |= p[7+15]; - end_pts = (p[7+16] << 24); + end_pts = ((int64_t)p[7+16] << 24); end_pts |= (p[7+17] << 16); end_pts |= (p[7+18] << 8); end_pts |= p[7+19]; @@ -1193,7 +1193,7 @@ } if ( ((p[0] & 0xf0) == 0x20) || ((p[0] & 0xf0) == 0x30) ) { - pts = (p[ 0] & 0x0E) << 29 ; + pts = (int64_t)(p[ 0] & 0x0E) << 29 ; pts |= p[ 1] << 22 ; pts |= (p[ 2] & 0xFE) << 14 ; pts |= p[ 3] << 7 ; @@ -1204,7 +1204,7 @@ if (p[7] & 0x80) { /* pts avail */ - pts = (p[ 9] & 0x0E) << 29 ; + pts = (int64_t)(p[ 9] & 0x0E) << 29 ; pts |= p[10] << 22 ; pts |= (p[11] & 0xFE) << 14 ; pts |= p[12] << 7 ; diff -r -u -b xine-lib-1-rc7-orig/src/demuxers/demux_pva.c xine-lib-1-rc7/src/demuxers/demux_pva.c --- xine-lib-1-rc7-orig/src/demuxers/demux_pva.c 2004-06-25 15:32:42.000000000 +0300 +++ xine-lib-1-rc7/src/demuxers/demux_pva.c 2004-11-22 16:59:02.716033480 +0200 @@ -233,7 +233,7 @@ return this->status; } - pts = (preamble[0] & 0x0e) << 29 ; + pts = (int64_t)(preamble[0] & 0x0e) << 29 ; pts |= (BE_16(&preamble[1]) & 0xFFFE) << 14; pts |= (BE_16(&preamble[3]) & 0xFFFE) >> 1;