[FFmpeg-cvslog] avformat/mp3dec: Fix definition of MIDDLE_BITS
Ingo Brückl
git at videolan.org
Wed Oct 4 03:19:10 EEST 2017
ffmpeg | branch: master | Ingo Brückl <ib at wupperonline.de> | Tue Oct 3 15:50:37 2017 +0200| [08c751309670854c73b58f234a83f4ba679370be] | committer: 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: Ingo Brückl <ib at wupperonline.de>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=08c751309670854c73b58f234a83f4ba679370be
---
libavformat/mp3dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
More information about the ffmpeg-cvslog
mailing list