From fb9a32977d6abf4c83a92d993af58e393819c062 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 2 Feb 2017 18:24:27 +0100 Subject: 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. --- demux/demux_lavf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'demux/demux_lavf.c') 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; -- cgit v1.2.3