Commit 08c75130 authored by Ingo Brückl's avatar Ingo Brückl Committed by Michael Niedermayer

avformat/mp3dec: Fix definition of MIDDLE_BITS

The number of bits from bit #m to #n is n - m plus 1.
Signed-off-by: 's avatarIngo Brückl <ib@wupperonline.de>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent d662143f
...@@ -142,7 +142,7 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st, ...@@ -142,7 +142,7 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
MPADecodeHeader *c, uint32_t spf) MPADecodeHeader *c, uint32_t spf)
{ {
#define LAST_BITS(k, n) ((k) & ((1 << (n)) - 1)) #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; uint16_t crc;
uint32_t v; uint32_t v;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment