summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvb.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-24 14:06:13 +0200
committerwm4 <wm4@nowhere>2014-05-24 16:17:52 +0200
commitaa87c143cb369f1448f8d08086b5ef98998b4436 (patch)
treeb3b3a079f5e82f66e62d46fcad1488a59f387d2c /stream/stream_dvb.c
parent80cbb3bac2e2b2a569d5a9a9c6dd5d4f2da04f7c (diff)
downloadmpv-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_dvb.c')
-rw-r--r--stream/stream_dvb.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c
index ba40c3afc3..cdf282d3ac 100644
--- a/stream/stream_dvb.c
+++ b/stream/stream_dvb.c
@@ -627,7 +627,7 @@ static int dvb_streaming_start(stream_t *stream, int tuner_type, char *progname)
-static int dvb_open(stream_t *stream, int mode)
+static int dvb_open(stream_t *stream)
{
// I don't force the file format bacause, although it's almost always TS,
// there are some providers that stream an IP multicast with M$ Mpeg4 inside
@@ -637,10 +637,6 @@ static int dvb_open(stream_t *stream, int mode)
char *progname;
int tuner_type = 0, i;
-
- if(mode != STREAM_READ)
- return STREAM_UNSUPPORTED;
-
priv->fe_fd = priv->sec_fd = priv->dvr_fd = -1;
priv->config = dvb_get_config(stream);
if(priv->config == NULL)