Browse Source

avcodec/adpcm_psx: ignore unknown flag bits

As per documentation.

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Zane van Iperen 3 years ago
parent
commit
d1c28c6c78
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libavcodec/adpcm.c

+ 1 - 1
libavcodec/adpcm.c

@@ -2002,7 +2002,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
                     filter = filter >> 4;
                     if (filter >= FF_ARRAY_ELEMS(xa_adpcm_table))
                         return AVERROR_INVALIDDATA;
-                    flag   = bytestream2_get_byteu(&gb);
+                    flag   = bytestream2_get_byteu(&gb) & 0x7;
 
                     /* Decode 28 samples.  */
                     for (n = 0; n < 28; n++) {