summaryrefslogtreecommitdiff
path: root/plugins/flac
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-05-18 19:10:10 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-05-18 19:10:10 +0200
commitd49a7298a12ac9f5dcb9f718dbe18b434d3eaadb (patch)
treebb837d271894a2f9bbd14ec9c835d6cb1d3a1ed7 /plugins/flac
parent646c94fcd5a45e0f0c7d845889f72cabe8878fd0 (diff)
fix division by zero in flac plugin
Diffstat (limited to 'plugins/flac')
-rw-r--r--plugins/flac/flac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/flac/flac.c b/plugins/flac/flac.c
index 43b1b1c0..c841a08f 100644
--- a/plugins/flac/flac.c
+++ b/plugins/flac/flac.c
@@ -246,8 +246,8 @@ cflac_init (DB_fileinfo_t *_info, DB_playItem_t *it) {
_info->plugin = &plugin;
_info->readpos = 0;
- if (_info->samplerate == -1) { // not a FLAC stream
- trace ("cflac_init not a flac stream\n");
+ if (_info->samplerate <= 0) { // not a FLAC stream
+ fprintf (stderr, "corrupted/invalid flac stream\n");
return -1;
}