diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-07-14 21:08:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-14 22:41:35 +0200 |
commit | 130a8e0eef2f81e0d853117e417b650c3e16d1b7 (patch) | |
tree | 11bfcf5561d7be0d4032eff823c66b1c36c651ec /libavformat/utils.c | |
parent | b90b6af710d0720af1395999f3e563831527cc75 (diff) | |
download | ffmpeg-130a8e0eef2f81e0d853117e417b650c3e16d1b7.tar.gz |
avformat: don't crash API users when demuxing mp4
This code is one big chunk of WTF.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index a123a59177..c40b4d2b27 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1788,7 +1788,7 @@ void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance) //We could use URLProtocol flags here but as many user applications do not use URLProtocols this would be unreliable const char *proto = avio_find_protocol_name(s->filename); - if (!(strcmp(proto, "file") && strcmp(proto, "pipe") && strcmp(proto, "cache"))) + if (proto && !(strcmp(proto, "file") && strcmp(proto, "pipe") && strcmp(proto, "cache"))) return; for (ist1 = 0; ist1 < s->nb_streams; ist1++) { |