aboutsummaryrefslogtreecommitdiffstats
path: root/src/encoder/VorbisEncoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-19 14:43:24 +0200
committerMax Kellermann <max@duempel.org>2013-10-19 14:43:24 +0200
commit8e063829c426e447021050eb214a77182269602e (patch)
tree74149152cf6183ae5b30e238f9db2b0e07d1cc1e /src/encoder/VorbisEncoderPlugin.cxx
parent139c6be370d8b010b010ba2e4bb6ec8a42b4fcfd (diff)
downloadmpd-8e063829c426e447021050eb214a77182269602e.tar.gz
mpd-8e063829c426e447021050eb214a77182269602e.tar.xz
mpd-8e063829c426e447021050eb214a77182269602e.zip
encoder/{opus,vorbis}: new serial generator replacing g_random_int()
Diffstat (limited to 'src/encoder/VorbisEncoderPlugin.cxx')
-rw-r--r--src/encoder/VorbisEncoderPlugin.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/encoder/VorbisEncoderPlugin.cxx b/src/encoder/VorbisEncoderPlugin.cxx
index 84b4cac28..1a2aa1a03 100644
--- a/src/encoder/VorbisEncoderPlugin.cxx
+++ b/src/encoder/VorbisEncoderPlugin.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "VorbisEncoderPlugin.hxx"
#include "OggStream.hxx"
+#include "OggSerial.hxx"
#include "EncoderAPI.hxx"
#include "tag/Tag.hxx"
#include "AudioFormat.hxx"
@@ -164,7 +165,7 @@ vorbis_encoder_reinit(struct vorbis_encoder *encoder, Error &error)
vorbis_analysis_init(&encoder->vd, &encoder->vi);
vorbis_block_init(&encoder->vd, &encoder->vb);
- encoder->stream.Initialize(g_random_int());
+ encoder->stream.Initialize(GenerateOggSerial());
return true;
}
@@ -294,7 +295,7 @@ vorbis_encoder_tag(Encoder *_encoder, const Tag *tag,
/* reset ogg_stream_state and begin a new stream */
- encoder->stream.Reinitialize(g_random_int());
+ encoder->stream.Reinitialize(GenerateOggSerial());
/* send that vorbis_comment to the ogg_stream_state */