[FFmpeg-devel] [RFC]lavc/adpcm: Support baby monitor adpcm_ms

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Apr 26 19:02:17 CEST 2016


Hi!

Attached patch fixes decoding a user-provided file here:
https://dropfile.to/x7hQfJt
I don't think there is a demuxer issue.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 5d8aa41..5a11faa 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -840,6 +840,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
     {
         int block_predictor;
 
+        if (bytestream2_peek_le16(&gb) == 0x1ee1)
+            bytestream2_skip(&gb, 2);
         block_predictor = bytestream2_get_byteu(&gb);
         if (block_predictor > 6) {
             av_log(avctx, AV_LOG_ERROR, "ERROR: block_predictor[0] = %d\n",


More information about the ffmpeg-devel mailing list