avcodec/adpcm: ADPCM_IMA_DK3 packets are padded to 16-bit packet boundary
authorPeter Ross <pross@xvid.org>
Sat, 15 Mar 2014 00:16:19 +0000 (11:16 +1100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 15 Mar 2014 00:34:42 +0000 (01:34 +0100)
Fixes ticket #3461.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/adpcm.c

index 56431cf..f7f8259 100644 (file)
@@ -922,6 +922,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
             *samples++ = c->status[0].predictor + c->status[1].predictor;
             *samples++ = c->status[0].predictor - c->status[1].predictor;
         }
+
+        if ((bytestream2_tell(&gb) & 1))
+            bytestream2_skip(&gb, 1);
         break;
     }
     case AV_CODEC_ID_ADPCM_IMA_ISS: