]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Skip 0x0000 frame footer in EA ADPCM decoder.
authorvitor <vitor@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 27 Apr 2009 16:04:43 +0000 (16:04 +0000)
committervitor <vitor@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 27 Apr 2009 16:04:43 +0000 (16:04 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18706 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/adpcm.c

index a72ee20dab5ec93f1c1be0c3caa66acc0d165a8a..d923fbe3a09bde93cda8e1309dd805e7a2ea5f7a 100644 (file)
@@ -1251,6 +1251,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
                 *samples++ = (unsigned short)current_right_sample;
             }
         }
+
+        if (src - buf == buf_size - 2)
+            src += 2; // Skip terminating 0x0000
+
         break;
     case CODEC_ID_ADPCM_EA_MAXIS_XA:
         for(channel = 0; channel < avctx->channels; channel++) {