[FFmpeg-devel] [PATCH 2/4] avcodec/adpcm_psx: ignore unknown flag bits

Zane van Iperen zane at zanevaniperen.com
Mon May 3 14:31:55 EEST 2021


As per documentation.

Signed-off-by: Zane van Iperen <zane at zanevaniperen.com>
---
 libavcodec/adpcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 8c07f3673d..89f3102716 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1984,7 +1984,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++) {
-- 
2.29.3



More information about the ffmpeg-devel mailing list