summaryrefslogtreecommitdiffstats
path: root/demux/demux_tv.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-02 18:24:27 +0100
committerwm4 <wm4@nowhere>2017-02-02 18:26:58 +0100
commitfb9a32977d6abf4c83a92d993af58e393819c062 (patch)
treedaa8fac391c393560588ce8653943a8259f59815 /demux/demux_tv.c
parente13a62fc346867450cd41d02cffbdaf477a3fec4 (diff)
downloadmpv-fb9a32977d6abf4c83a92d993af58e393819c062.tar.bz2
mpv-fb9a32977d6abf4c83a92d993af58e393819c062.tar.xz
stream: get rid of streamtype enum
Because it's kind of dumb. (But not sure if it was worth the trouble.) For stream_file.c, we add new explicit fields. The rest are rather special uses and can be killed by comparing the stream impl. name. The changes to DVD/BD/CD/TV are entirely untested.
Diffstat (limited to 'demux/demux_tv.c')
-rw-r--r--demux/demux_tv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/demux/demux_tv.c b/demux/demux_tv.c
index 42b0ce5ff3..4a8e0c70fa 100644
--- a/demux/demux_tv.c
+++ b/demux/demux_tv.c
@@ -22,7 +22,10 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
tvi_handle_t *tvh;
const tvi_functions_t *funcs;
- if (check > DEMUX_CHECK_REQUEST || demuxer->stream->type != STREAMTYPE_TV)
+ if (check > DEMUX_CHECK_REQUEST)
+ return -1;
+
+ if (!demuxer->stream->info || strcmp(demuxer->stream->info->name, "tv") != 0)
return -1;
tv_param_t *params = mp_get_config_group(demuxer, demuxer->global,