]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/adpcm_argo: reset state on flush
authorZane van Iperen <zane@zanevaniperen.com>
Tue, 23 Mar 2021 10:58:33 +0000 (20:58 +1000)
committerZane van Iperen <zane@zanevaniperen.com>
Thu, 25 Mar 2021 02:51:08 +0000 (12:51 +1000)
Commit 003b5c800fef909fa84dd2fae43d66bd434d3f7e introduced seeking in argo_asf,
but this was missed, leading to non-deterministic output.

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
libavcodec/adpcm.c

index b0354065502ff94604eb97cccfedeabb8e4a03e6..07fa1a65b3bba4ae2e781af827ce9fb23214253b 100644 (file)
@@ -2116,6 +2116,13 @@ static void adpcm_flush(AVCodecContext *avctx)
             c->status[channel].step = 0;
         break;
 
+    case AV_CODEC_ID_ADPCM_ARGO:
+        for (int channel = 0; channel < avctx->channels; channel++) {
+            c->status[channel].sample1 = 0;
+            c->status[channel].sample2 = 0;
+        }
+        break;
+
     case AV_CODEC_ID_ADPCM_ZORK:
         for (int channel = 0; channel < avctx->channels; channel++) {
             c->status[channel].predictor  = 0;