summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-04 19:57:39 +0100
committerwm4 <wm4@nowhere>2013-11-04 19:57:39 +0100
commit859964e0db5916f346534b9945e2b884f0cf082f (patch)
treed8f2d216ef7cc01efdeeda6c18ef777aea54da31 /stream
parent41fedab2d9255ae496236e9292c70acdbb11bbf9 (diff)
downloadmpv-859964e0db5916f346534b9945e2b884f0cf082f.tar.bz2
mpv-859964e0db5916f346534b9945e2b884f0cf082f.tar.xz
stream_lavf: don't duplicate list of rtmp protocols
Assume a rtmp prefix means rtmp instead.
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_lavf.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c
index eecb3f6579..a3c803d70a 100644
--- a/stream/stream_lavf.c
+++ b/stream/stream_lavf.c
@@ -219,12 +219,10 @@ static int open_f(stream_t *stream, int mode)
}
}
- char *rtmp[] = {"rtmp:", "rtmpt:", "rtmpe:", "rtmpte:", "rtmps:"};
- for (int i = 0; i < FF_ARRAY_ELEMS(rtmp); i++)
- if (!strncmp(filename, rtmp[i], strlen(rtmp[i]))) {
- stream->demuxer = "lavf";
- stream->lavf_type = "flv";
- }
+ if (strncmp(filename, "rtmp", 4) == 0) {
+ stream->demuxer = "lavf";
+ stream->lavf_type = "flv";
+ }
stream->priv = avio;
int64_t size = avio_size(avio);
if (size >= 0)