diff options
author | wm4 <wm4@nowhere> | 2014-05-24 14:06:13 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-24 16:17:52 +0200 |
commit | aa87c143cb369f1448f8d08086b5ef98998b4436 (patch) | |
tree | b3b3a079f5e82f66e62d46fcad1488a59f387d2c /stream/stream_cdda.c | |
parent | 80cbb3bac2e2b2a569d5a9a9c6dd5d4f2da04f7c (diff) | |
download | mpv-aa87c143cb369f1448f8d08086b5ef98998b4436.tar.bz2 mpv-aa87c143cb369f1448f8d08086b5ef98998b4436.tar.xz |
stream: remove chaos related to writeable streams
For some reason, we support writeable streams. (Only encoding uses that,
and the use of it looks messy enough that I want to replace it with FILE
or avio today.)
It's a chaos: most streams do not actually check the mode parameter like
they should. Simplify it, and let streams signal availability of write
mode by setting a flag in the stream info struct.
Diffstat (limited to 'stream/stream_cdda.c')
-rw-r--r-- | stream/stream_cdda.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index 856c9736d2..f6740c1816 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -283,7 +283,7 @@ static int control(stream_t *stream, int cmd, void *arg) return STREAM_UNSUPPORTED; } -static int open_cdda(stream_t *st, int m) +static int open_cdda(stream_t *st) { cdda_priv *priv = st->priv; cdda_priv *p = priv; @@ -292,10 +292,6 @@ static int open_cdda(stream_t *st, int m) cdrom_drive_t *cdd = NULL; int last_track; - if (m != STREAM_READ) { - return STREAM_UNSUPPORTED; - } - if (!p->device) { if (cdrom_device) p->device = talloc_strdup(NULL, cdrom_device); |