]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpc8.c
correctly interleave audio and video according to specs
[ffmpeg] / libavcodec / mpc8.c
index d235edd8614f1462804cc059b20b5a3baa5a3c5e..ff7d5e5805c873104dacb3cf498ff7bc3706640a 100644 (file)
@@ -25,7 +25,7 @@
  * divided into 32 subbands.
  */
 
-#include "libavutil/random.h"
+#include "libavutil/lfg.h"
 #include "avcodec.h"
 #include "bitstream.h"
 #include "dsputil.h"
@@ -100,7 +100,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
         return -1;
     }
     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
-    av_random_init(&c->rnd, 0xDEADBEEF);
+    av_lfg_init(&c->rnd, 0xDEADBEEF);
     dsputil_init(&c->dsp, avctx);
 
     ff_mpc_init();
@@ -284,7 +284,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx,
             switch(res){
             case -1:
                 for(j = 0; j < SAMPLES_PER_BAND; j++)
-                    c->Q[ch][off + j] = (av_random(&c->rnd) & 0x3FC) - 510;
+                    c->Q[ch][off + j] = (av_lfg_get(&c->rnd) & 0x3FC) - 510;
                 break;
             case 0:
                 break;