Commit 130a8e0e authored by wm4's avatar wm4 Committed by Michael Niedermayer

avformat: don't crash API users when demuxing mp4

This code is one big chunk of WTF.
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent b90b6af7
......@@ -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++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment