diff options
author | Max Kellermann <max@duempel.org> | 2015-06-22 14:40:47 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-06-22 14:40:51 +0200 |
commit | e38e8eb6365e6c5534a5362b25746279a79c8a1a (patch) | |
tree | 9994e561a92b6ce8370af0932f8d3be099e304b0 /src/decoder | |
parent | bef8c83388b71430100349faa20081bd77f155c6 (diff) | |
download | mpd-e38e8eb6365e6c5534a5362b25746279a79c8a1a.tar.gz mpd-e38e8eb6365e6c5534a5362b25746279a79c8a1a.tar.xz mpd-e38e8eb6365e6c5534a5362b25746279a79c8a1a.zip |
decoder/vorbis: check STOP before entering the loop
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/plugins/VorbisDecoderPlugin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/plugins/VorbisDecoderPlugin.cxx b/src/decoder/plugins/VorbisDecoderPlugin.cxx index d569f747e..c6377b9ab 100644 --- a/src/decoder/plugins/VorbisDecoderPlugin.cxx +++ b/src/decoder/plugins/VorbisDecoderPlugin.cxx @@ -263,7 +263,7 @@ vorbis_stream_decode(Decoder &decoder, unsigned kbit_rate = 0; DecoderCommand cmd = decoder_get_command(decoder); - do { + while (cmd != DecoderCommand::STOP) { if (cmd == DecoderCommand::SEEK) { auto seek_where = decoder_seek_where_frame(decoder); if (0 == ov_pcm_seek_page(&vf, seek_where)) { @@ -332,7 +332,7 @@ vorbis_stream_decode(Decoder &decoder, cmd = decoder_data(decoder, input_stream, buffer, nbytes, kbit_rate); - } while (cmd != DecoderCommand::STOP); + } ov_clear(&vf); } |