summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_dvd.c6
-rw-r--r--stream/stream_dvdnav.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index 7e3c9c1cc3..3dc7e76cc3 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -730,8 +730,10 @@ static int control(stream_t *stream,int cmd,void* arg)
case STREAM_CTRL_GET_DVD_VOLUME_ID:
{
char buffer[128];
- if (DVDUDFVolumeInfo(d->dvd, buffer, sizeof(buffer), NULL, 0) < 0
- && DVDISOVolumeInfo(d->dvd, buffer, sizeof(buffer), NULL, 0) < 0)
+ if (DVDUDFVolumeInfo(d->dvd, buffer, sizeof(buffer), NULL, 0) < 0 &&
+ DVDISOVolumeInfo(d->dvd, buffer, sizeof(buffer), NULL, 0) < 0)
+ return STREAM_ERROR;
+ if (!buffer[0])
return STREAM_ERROR;
*(char**)arg = talloc_strdup(NULL, buffer);
return STREAM_OK;
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index 537047fe04..887b112d70 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -604,7 +604,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 || !volume)
+ if (dvdnav_get_title_string(dvdnav, &volume) != DVDNAV_STATUS_OK)
+ return STREAM_ERROR;
+ if (!volume || !volume[0])
return STREAM_ERROR;
*(char**)arg = talloc_strdup(NULL, volume);
return STREAM_OK;