From 5ee0b69d396a5d9fa8794f48069b0be0dbe674a5 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 12 Aug 2018 19:50:54 +0200 Subject: [PATCH] [transcode] Set ffmpeg options so that it will attempt to reconnect streams --- src/transcode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/transcode.c b/src/transcode.c index 0135b6a7..fa4ca863 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -748,6 +748,10 @@ open_input(struct decode_ctx *ctx, const char *path, struct evbuffer *evbuf) user_agent = cfg_getstr(cfg_getsec(cfg, "general"), "user_agent"); av_dict_set(&options, "user_agent", user_agent, 0); + + av_dict_set(&options, "reconnect", "1", 0); + av_dict_set(&options, "reconnect_at_eof", "1", 0); + av_dict_set(&options, "reconnect_streamed", "1", 0); } // TODO Newest versions of ffmpeg have timeout and reconnect options we should use