summaryrefslogtreecommitdiffstats
path: root/libmpdemux/cdda.c
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-08-13 11:18:24 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-08-13 11:18:24 +0000
commite5e805b73ff0bdf92799e6ae371d6e2005b4df46 (patch)
treee499e773de3bcab7f0ced4ebc8558a4c7d038fdb /libmpdemux/cdda.c
parentb129045b120f74ce4ebbd0aa33290b8bf397345b (diff)
downloadmpv-e5e805b73ff0bdf92799e6ae371d6e2005b4df46.tar.bz2
mpv-e5e805b73ff0bdf92799e6ae371d6e2005b4df46.tar.xz
Fix -cdrom-device to work again with cdda and vcd.
Based on patch from Arwed von Merkatz. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10592 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/cdda.c')
-rw-r--r--libmpdemux/cdda.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libmpdemux/cdda.c b/libmpdemux/cdda.c
index d33e5a5dba..6d46e1aab3 100644
--- a/libmpdemux/cdda.c
+++ b/libmpdemux/cdda.c
@@ -12,6 +12,8 @@
#include "cdd.h"
+extern char *cdrom_device;
+
static struct cdda_params {
int speed;
int paranoia_mode;
@@ -32,7 +34,7 @@ static struct cdda_params {
0,
0,
0,
- DEFAULT_CDROM_DEVICE,
+ NULL,
{ 0, 0 }
};
@@ -101,6 +103,13 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) {
return STREAM_UNSUPORTED;
}
+ if(!p->device) {
+ if (cdrom_device)
+ p->device = strdup(cdrom_device);
+ else
+ p->device = strdup(DEFAULT_CDROM_DEVICE);
+ }
+
#ifdef MPLAYER_NETWORK
if(strncmp(st->url,"cddb",4) == 0) {
i = cddb_resolve(p->device, &xmcd_file);