From 40486fd8bd5b0ca0e5fe67a21563bc07a0a1c838 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 23 Feb 2014 18:15:32 +0100 Subject: dvd: treat missing volume ID as "unsupported", not error This is probably better and more consistent with the rest of the code, although it doesn't change any currently existing behavior in this case. --- stream/stream_dvd.c | 4 ++-- stream/stream_dvdnav.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'stream') diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index 3dc7e76cc3..43cab53b30 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -732,9 +732,9 @@ static int control(stream_t *stream,int cmd,void* arg) char buffer[128]; if (DVDUDFVolumeInfo(d->dvd, buffer, sizeof(buffer), NULL, 0) < 0 && DVDISOVolumeInfo(d->dvd, buffer, sizeof(buffer), NULL, 0) < 0) - return STREAM_ERROR; + break; if (!buffer[0]) - return STREAM_ERROR; + break; *(char**)arg = talloc_strdup(NULL, buffer); return STREAM_OK; } diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index 887b112d70..508acd4d04 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -605,9 +605,9 @@ static int control(stream_t *stream, int cmd, void *arg) case STREAM_CTRL_GET_DVD_VOLUME_ID: { const char *volume = NULL; if (dvdnav_get_title_string(dvdnav, &volume) != DVDNAV_STATUS_OK) - return STREAM_ERROR; + break; if (!volume || !volume[0]) - return STREAM_ERROR; + break; *(char**)arg = talloc_strdup(NULL, volume); return STREAM_OK; } -- cgit v1.2.3