summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;