diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-13 14:25:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-13 14:27:02 +0200 |
commit | b5136612510052a7acacd560b9b5edad69402519 (patch) | |
tree | b087b27a1c35273b788414fd82bee87b14deaf41 /libavformat | |
parent | f5c281daa8aed4618f94e4131be17e772f6673f8 (diff) | |
download | ffmpeg-b5136612510052a7acacd560b9b5edad69402519.tar.gz |
avformat/utils: Skip ff_configure_buffers_for_index() for local files
Theres no known case where its use on local files improves performance
if you know of such a case, please contact us
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index d91d84805d..a123a59177 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1785,6 +1785,11 @@ void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance) { int ist1, ist2; int64_t pos_delta = 0; + //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"))) + return; for (ist1 = 0; ist1 < s->nb_streams; ist1++) { AVStream *st1 = s->streams[ist1]; |