aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Brückl <ib@wupperonline.de>2017-10-03 15:50:37 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-10-04 02:16:11 +0200
commit08c751309670854c73b58f234a83f4ba679370be (patch)
tree29c8729e9cafe61a7f5ecf48f968beaf06734478
parentd662143f064636f11d92083cd9aa4f907cf97d59 (diff)
downloadffmpeg-08c751309670854c73b58f234a83f4ba679370be.tar.gz
avformat/mp3dec: Fix definition of MIDDLE_BITS
The number of bits from bit #m to #n is n - m plus 1. Signed-off-by: Ingo Brückl <ib@wupperonline.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mp3dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 0924a57843..a5c4f2ea12 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -142,7 +142,7 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
MPADecodeHeader *c, uint32_t spf)
{
#define LAST_BITS(k, n) ((k) & ((1 << (n)) - 1))
-#define MIDDLE_BITS(k, m, n) LAST_BITS((k) >> (m), ((n) - (m)))
+#define MIDDLE_BITS(k, m, n) LAST_BITS((k) >> (m), ((n) - (m) + 1))
uint16_t crc;
uint32_t v;