aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-06-30 23:38:49 +0200
committerMax Kellermann <max@duempel.org>2010-06-30 23:38:49 +0200
commita1882f48beee0c1b6750ec03f8b133e7325057a9 (patch)
tree274136dceee0a9bd52d97731d2ca4ad3a821e24a /src/decoder
parentc3569814bda057142da3f02a8d0cccb35184e396 (diff)
downloadmpd-a1882f48beee0c1b6750ec03f8b133e7325057a9.tar.gz
mpd-a1882f48beee0c1b6750ec03f8b133e7325057a9.tar.xz
mpd-a1882f48beee0c1b6750ec03f8b133e7325057a9.zip
decoder/vorbis: handle uri==NULL
This fixes a theoretical crash, which has never occurred in practice.
Diffstat (limited to '')
-rw-r--r--src/decoder/vorbis_plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder/vorbis_plugin.c b/src/decoder/vorbis_plugin.c
index 3da56bd5c..7c782a779 100644
--- a/src/decoder/vorbis_plugin.c
+++ b/src/decoder/vorbis_plugin.c
@@ -233,6 +233,9 @@ oggvorbis_seekable(struct decoder *decoder)
bool seekable;
uri = decoder_get_uri(decoder);
+ if (uri == NULL)
+ return false;
+
/* disable seeking on remote streams, because libvorbis seeks
around like crazy, and due to being very expensive, this
delays song playback my 10 or 20 seconds */