aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-28 01:07:11 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-28 01:07:11 +0100
commit1e19927f12a2a65954aabf38b584025beff15cc3 (patch)
tree33c88297cb164490ebe38b67cf353029d9fb83f2 /libavformat/mpc.c
parentca55606a5127a9ddb10e4c1971c56e3e69bfd864 (diff)
parent1f948745c3cbe45c4ccd5d8996fc885d826bf3ff (diff)
downloadffmpeg-1e19927f12a2a65954aabf38b584025beff15cc3.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: vc1: use an enum for Frame Coding Mode doc: cleanup filter section indeo3: error out if no motion vector is set. x86inc: Flag shufps as an floating-point instruction for the AVX emulation code. mpegaudio: do not use init_static_data() for initializing tables. musepack: fix signed shift overflow in mpc_read_packet() mov: Make format string match variable type. wmavoice: Make format string match variable type. vc1: select interlaced scan table by FCM element Generalize RIFF INFO tag support; support reading INFO tag in wav pthread: track thread existence in a separate variable. Conflicts: doc/filters.texi libavcodec/pthread.c libavformat/avi.c libavformat/riff.c libavformat/riff.h libavformat/wav.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpc.c')
-rw-r--r--libavformat/mpc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mpc.c b/libavformat/mpc.c
index f377e1f990..87d2abe1b5 100644
--- a/libavformat/mpc.c
+++ b/libavformat/mpc.c
@@ -117,7 +117,8 @@ static int mpc_read_packet(AVFormatContext *s, AVPacket *pkt)
{
MPCContext *c = s->priv_data;
int ret, size, size2, curbits, cur = c->curframe;
- int64_t tmp, pos;
+ unsigned tmp;
+ int64_t pos;
if (c->curframe >= c->fcount && c->fcount)
return -1;
@@ -134,8 +135,7 @@ static int mpc_read_packet(AVFormatContext *s, AVPacket *pkt)
if(curbits <= 12){
size2 = (tmp >> (12 - curbits)) & 0xFFFFF;
}else{
- tmp = (tmp << 32) | avio_rl32(s->pb);
- size2 = (tmp >> (44 - curbits)) & 0xFFFFF;
+ size2 = (tmp << (curbits - 12) | avio_rl32(s->pb) >> (44 - curbits)) & 0xFFFFF;
}
curbits += 20;
avio_seek(s->pb, pos, SEEK_SET);