ffmpeg | branch: master | Rostislav Pehlivanov <atomnu...@gmail.com> | Wed May 
10 06:07:46 2017 +0100| [e6ec482b429b241de0fb3088d87e28777d70ded5] | committer: 
Rostislav Pehlivanov

opusenc: initialize PVQ prng seed

Fixes valgrind warnings, didn't affect anything since it was only used
for resynthesis.

Signed-off-by: Rostislav Pehlivanov <atomnu...@gmail.com>

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

 libavcodec/opusenc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/opusenc.c b/libavcodec/opusenc.c
index 5f5700ea50..41e1a3fb38 100644
--- a/libavcodec/opusenc.c
+++ b/libavcodec/opusenc.c
@@ -1083,8 +1083,10 @@ static av_cold int opus_encode_init(AVCodecContext 
*avctx)
         if ((ret = ff_mdct15_init(&s->mdct[i], 0, i + 3, 68 << (CELT_BLOCK_NB 
- 1 - i))))
             return AVERROR(ENOMEM);
 
-    for (i = 0; i < OPUS_MAX_FRAMES_PER_PACKET; i++)
+    for (i = 0; i < OPUS_MAX_FRAMES_PER_PACKET; i++) {
         s->frame[i].block[0].emph_coeff = s->frame[i].block[1].emph_coeff = 
0.0f;
+        s->frame[i].seed = 0;
+    }
 
     /* Zero out previous energy (matters for inter first frame) */
     for (ch = 0; ch < s->channels; ch++)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to