From 36deec010cc87c8990477e1703dbf785212992b5 Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Tue, 17 Apr 2018 14:25:07 +0800 Subject: [PATCH] avformat/hls: copy rw_timeout from parent to child AVIOContexts. The rw_timeout option is currently not applied when opening media playlist, segment, or encryption key URLs. This can cause the HLS demuxer to block indefinitely, even when the rw_timeout option has been specified. This change simply enables carrying over the rw_timeout option when the demuxer opens these URLs. Reviewed-by: Steven Liu Signed-off-by: Richard Shaffer --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 2387d06e5f..3be708bd08 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1637,7 +1637,7 @@ static int save_avio_options(AVFormatContext *s) { HLSContext *c = s->priv_data; static const char * const opts[] = { - "headers", "http_proxy", "user_agent", "user-agent", "cookies", "referer", NULL }; + "headers", "http_proxy", "user_agent", "user-agent", "cookies", "referer", "rw_timeout", NULL }; const char * const * opt = opts; uint8_t *buf; int ret = 0;