You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/utils: inform the user if the protocol cannot be determined
Assuming the wrong protocol can lead to suboptimal seeking performance Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -1789,6 +1789,13 @@ 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
|
//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);
|
const char *proto = avio_find_protocol_name(s->filename);
|
||||||
|
|
||||||
|
if (!proto) {
|
||||||
|
av_log(s, AV_LOG_INFO,
|
||||||
|
"Protocol name not provided, cannot determine if input is local or "
|
||||||
|
"a network protocol, buffers and access patterns cannot be configured "
|
||||||
|
"optimally without knowing the protocol\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (proto && !(strcmp(proto, "file") && strcmp(proto, "pipe") && strcmp(proto, "cache")))
|
if (proto && !(strcmp(proto, "file") && strcmp(proto, "pipe") && strcmp(proto, "cache")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user