[FFmpeg-cvslog] avcodec/adpcm: ADPCM_IMA_DK3 packets are padded to 16-bit packet boundary

Peter Ross git at videolan.org
Mon Mar 17 16:08:41 CET 2014


ffmpeg | branch: release/2.2 | Peter Ross <pross at xvid.org> | Sat Mar 15 11:16:19 2014 +1100| [4aab3f868f35b2df0053f840cdfd8186d726905f] | committer: Carl Eugen Hoyos

avcodec/adpcm: ADPCM_IMA_DK3 packets are padded to 16-bit packet boundary

Fixes ticket #3461.

Signed-off-by: Peter Ross <pross at xvid.org>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit d1bb17940dd242e56541775318636bcbe3eab73d)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4aab3f868f35b2df0053f840cdfd8186d726905f
---

 libavcodec/adpcm.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 1005a1b..b34186a 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -917,6 +917,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:



More information about the ffmpeg-cvslog mailing list