diff options
author | Michal Nazarewicz <mina86@mina86.com> | 2015-03-23 19:14:54 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-03-25 18:02:54 +0100 |
commit | 0d7ee2b014db4f5072ac17839d0c7f3535c60675 (patch) | |
tree | 6c25292077d5b4d2915f3f94aa6fa8942ad3f833 /src/encoder | |
parent | 2f5fd91bd8cb11ce064b4002c1ed47dd7fb0d6f6 (diff) | |
download | mpd-0d7ee2b014db4f5072ac17839d0c7f3535c60675.tar.gz mpd-0d7ee2b014db4f5072ac17839d0c7f3535c60675.tar.xz mpd-0d7ee2b014db4f5072ac17839d0c7f3535c60675.zip |
OpusEncoderPlugin: initialise granulepos so we end up with sane values
Not initialising granulepos leads to it having arbitrary values in the
encoded stream including possibly negative values which are not valid
and confuse opusdec. Explicitly initialise opus_encoder::granulepos
to avoid that problem.
Diffstat (limited to 'src/encoder')
-rw-r--r-- | src/encoder/plugins/OpusEncoderPlugin.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoder/plugins/OpusEncoderPlugin.cxx b/src/encoder/plugins/OpusEncoderPlugin.cxx index 27b614b86..2b52228cb 100644 --- a/src/encoder/plugins/OpusEncoderPlugin.cxx +++ b/src/encoder/plugins/OpusEncoderPlugin.cxx @@ -66,7 +66,7 @@ struct opus_encoder { ogg_int64_t granulepos; - opus_encoder():encoder(opus_encoder_plugin) {} + opus_encoder():encoder(opus_encoder_plugin), granulepos(0) {} }; static constexpr Domain opus_encoder_domain("opus_encoder"); |