aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/flac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:20:50 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:20:50 +0000
commit3919a87525f53f4b2d9a30fbe5e8573e2aba822b (patch)
tree7d6041b40c9d371e0d6bdabf12a13946151d2601 /src/inputPlugins/flac_plugin.c
parent1db6478491d0fd700687e33177b275fdfa90affc (diff)
downloadmpd-3919a87525f53f4b2d9a30fbe5e8573e2aba822b.tar.gz
mpd-3919a87525f53f4b2d9a30fbe5e8573e2aba822b.tar.xz
mpd-3919a87525f53f4b2d9a30fbe5e8573e2aba822b.zip
replaced assertion with check
During my tests, it happened that data->position>newPosition. I have not yet fully understood why this can happen; for now, replace this with a run-time check. git-svn-id: https://svn.musicpd.org/mpd/trunk@7334 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/flac_plugin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index 0faee293c..b5c18af75 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -262,8 +262,7 @@ static FLAC__StreamDecoderWriteStatus flacWrite(const flac_decoder *dec,
data->time += timeChange;
flac_get_decode_position(dec, &newPosition);
- if (data->position) {
- assert(newPosition >= data->position);
+ if (data->position && newPosition >= data->position) {
assert(timeChange >= 0);
data->bitRate =