diff options
-rw-r--r-- | plugins/ape/ape.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/ape/ape.c b/plugins/ape/ape.c index 1a24eb08..87045082 100644 --- a/plugins/ape/ape.c +++ b/plugins/ape/ape.c @@ -98,6 +98,9 @@ ape_read (char *buffer, int size) { ape_blocks_left -= nblocks; samplesdecoded += nblocks; plugin.info.readpos = samplesdecoded / (float)plugin.info.samplerate - timestart; + if (plugin.info.readpos >= timeend) { + return 0; + } return nblocks * 2 * plugin.info.channels; } |