[FFmpeg-cvslog] amrwbdec: Decode the fr_quality bit properly

Martin Storsjö git at videolan.org
Sat Aug 18 15:26:27 CEST 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Aug 17 14:53:52 2012 +0300| [ca00a7e809a4b9c9fb146403d278964b88d16b85] | committer: Martin Storsjö

amrwbdec: Decode the fr_quality bit properly

The way this bit is decoded was accidentally flipped in b70feb405,
leading to warnings "Encountered a bad or corrupted frame" for each
decoded frame.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ca00a7e809a4b9c9fb146403d278964b88d16b85
---

 libavcodec/amrwbdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 4885c2d..a90a27a 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -122,7 +122,7 @@ static int decode_mime_header(AMRWBContext *ctx, const uint8_t *buf)
 {
     /* Decode frame header (1st octet) */
     ctx->fr_cur_mode  = buf[0] >> 3 & 0x0F;
-    ctx->fr_quality   = (buf[0] & 0x4) != 0x4;
+    ctx->fr_quality   = (buf[0] & 0x4) == 0x4;
 
     return 1;
 }



More information about the ffmpeg-cvslog mailing list