diff options
author | wm4 <wm4@nowhere> | 2017-02-02 18:24:27 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-02-02 18:26:58 +0100 |
commit | fb9a32977d6abf4c83a92d993af58e393819c062 (patch) | |
tree | daa8fac391c393560588ce8653943a8259f59815 /demux/demux_lavf.c | |
parent | e13a62fc346867450cd41d02cffbdaf477a3fec4 (diff) | |
download | mpv-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_lavf.c')
-rw-r--r-- | demux/demux_lavf.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 124956378c..50391a29da 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -338,7 +338,7 @@ static int lavf_check_file(demuxer_t *demuxer, enum demux_check check) priv->filename = remove_prefix(s->url, prefixes); char *avdevice_format = NULL; - if (s->uncached_type == STREAMTYPE_AVDEVICE) { + if (s->info && strcmp(s->info->name, "avdevice") == 0) { // always require filename in the form "format:filename" char *sep = strchr(priv->filename, ':'); if (!sep) { @@ -808,10 +808,7 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check) AVDictionary *dopts = NULL; - if ((priv->avif_flags & AVFMT_NOFILE) || - priv->stream->type == STREAMTYPE_AVDEVICE || - priv->format_hack.no_stream) - { + if ((priv->avif_flags & AVFMT_NOFILE) || priv->format_hack.no_stream) { mp_setup_av_network_options(&dopts, demuxer->global, demuxer->log); // This might be incorrect. demuxer->seekable = true; |