From 3a897afc4409ccf70d62281b25f70f3d83aa8cec Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Tue, 7 Apr 2020 21:43:30 +0200 Subject: [PATCH] [xcode] Use smaller probe size for remote tracks for quicker startup --- src/transcode.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/transcode.c b/src/transcode.c index f5bed55c..c2d89289 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -786,10 +786,12 @@ open_input(struct decode_ctx *ctx, const char *path, struct evbuffer *evbuf) if (ctx->data_kind == DATA_KIND_HTTP) { -# ifndef HAVE_FFMPEG - // Without this, libav is slow to probe some internet streams, which leads to RAOP timeouts - ctx->ifmt_ctx->probesize = 64000; -# endif + // We take the chance of a small probe size to start quicker + search for + // embedded artwork quicker. The standard probe size takes around 5 sec + // for an mp3, while the below only takes around a second. + ctx->ifmt_ctx->probesize = 65536; + ctx->ifmt_ctx->format_probesize = 65536; + av_dict_set(&options, "icy", "1", 0); user_agent = cfg_getstr(cfg_getsec(cfg, "general"), "user_agent");