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>
This commit is contained in:
Ingo Brückl 2017-10-03 15:50:37 +02:00 committed by Michael Niedermayer
parent d662143f06
commit 08c7513096

View File

@ -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;