avcodec/apedec: fix decoding of stereo files with one channel full of silence
authorPaul B Mahol <onemda@gmail.com>
Tue, 12 Apr 2016 08:51:30 +0000 (10:51 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 29 Apr 2016 12:23:41 +0000 (14:23 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 9149e9c0baaec122bc3da925d6068dffa60b5427)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/apedec.c

index 9984b40..2cd77d4 100644 (file)
@@ -1372,7 +1372,7 @@ static void ape_unpack_stereo(APEContext *ctx, int count)
     int32_t *decoded0 = ctx->decoded[0];
     int32_t *decoded1 = ctx->decoded[1];
 
-    if (ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) {
+    if ((ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) == APE_FRAMECODE_STEREO_SILENCE) {
         /* We are pure silence, so we're done. */
         av_log(ctx->avctx, AV_LOG_DEBUG, "pure silence stereo\n");
         return;