decoder/vorbis: check STOP before entering the loop
This commit is contained in:
parent
bef8c83388
commit
e38e8eb636
@ -263,7 +263,7 @@ vorbis_stream_decode(Decoder &decoder,
|
|||||||
unsigned kbit_rate = 0;
|
unsigned kbit_rate = 0;
|
||||||
|
|
||||||
DecoderCommand cmd = decoder_get_command(decoder);
|
DecoderCommand cmd = decoder_get_command(decoder);
|
||||||
do {
|
while (cmd != DecoderCommand::STOP) {
|
||||||
if (cmd == DecoderCommand::SEEK) {
|
if (cmd == DecoderCommand::SEEK) {
|
||||||
auto seek_where = decoder_seek_where_frame(decoder);
|
auto seek_where = decoder_seek_where_frame(decoder);
|
||||||
if (0 == ov_pcm_seek_page(&vf, seek_where)) {
|
if (0 == ov_pcm_seek_page(&vf, seek_where)) {
|
||||||
@ -332,7 +332,7 @@ vorbis_stream_decode(Decoder &decoder,
|
|||||||
cmd = decoder_data(decoder, input_stream,
|
cmd = decoder_data(decoder, input_stream,
|
||||||
buffer, nbytes,
|
buffer, nbytes,
|
||||||
kbit_rate);
|
kbit_rate);
|
||||||
} while (cmd != DecoderCommand::STOP);
|
}
|
||||||
|
|
||||||
ov_clear(&vf);
|
ov_clear(&vf);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user