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 <lq@chinaffmpeg.org>
Signed-off-by: Richard Shaffer <rshaffer@tunein.com>
This commit is contained in:
Steven Liu 2018-04-17 14:25:07 +08:00
parent 4effd1c4a2
commit 36deec010c
1 changed files with 1 additions and 1 deletions

View File

@ -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;