[xcode] Use smaller probe size for remote tracks for quicker startup

This commit is contained in:
ejurgensen 2020-04-07 21:43:30 +02:00
parent a8e6522a3c
commit 3a897afc44

View File

@ -786,10 +786,12 @@ open_input(struct decode_ctx *ctx, const char *path, struct evbuffer *evbuf)
if (ctx->data_kind == DATA_KIND_HTTP) if (ctx->data_kind == DATA_KIND_HTTP)
{ {
# ifndef HAVE_FFMPEG // We take the chance of a small probe size to start quicker + search for
// Without this, libav is slow to probe some internet streams, which leads to RAOP timeouts // embedded artwork quicker. The standard probe size takes around 5 sec
ctx->ifmt_ctx->probesize = 64000; // for an mp3, while the below only takes around a second.
# endif ctx->ifmt_ctx->probesize = 65536;
ctx->ifmt_ctx->format_probesize = 65536;
av_dict_set(&options, "icy", "1", 0); av_dict_set(&options, "icy", "1", 0);
user_agent = cfg_getstr(cfg_getsec(cfg, "general"), "user_agent"); user_agent = cfg_getstr(cfg_getsec(cfg, "general"), "user_agent");