[FFmpeg-cvslog] avformat/utils: Skip ff_configure_buffers_for_index() for local files
Michael Niedermayer
git at videolan.org
Mon Jul 13 14:37:53 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Jul 13 14:25:38 2015 +0200| [b5136612510052a7acacd560b9b5edad69402519] | committer: Michael Niedermayer
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 at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b5136612510052a7acacd560b9b5edad69402519
---
libavformat/utils.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d91d848..a123a59 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];
More information about the ffmpeg-cvslog
mailing list