The existing option only allows users to set the max delay for a
single attempt, rather than the total allowed delay, which is both
pretty unintitive, and only applicable when exponential backoff is
used.
The default for this option is set to 256, which is just above the
effective total delay accomplished by the the existing
reconnect_delay_max default of 120.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
{"reconnect_streamed","auto reconnect streamed / non seekable streams",OFFSET(reconnect_streamed),AV_OPT_TYPE_BOOL,{.i64=0},0,1,D},
{"reconnect_delay_max","max reconnect delay in seconds after which to give up",OFFSET(reconnect_delay_max),AV_OPT_TYPE_INT,{.i64=120},0,UINT_MAX/1000/1000,D},
{"reconnect_max_retries","the max number of times to retry a connection",OFFSET(reconnect_max_retries),AV_OPT_TYPE_INT,{.i64=-1},-1,INT_MAX,D},
{"reconnect_delay_total_max","max total reconnect delay in seconds after which to give up",OFFSET(reconnect_delay_total_max),AV_OPT_TYPE_INT,{.i64=256},0,UINT_MAX/1000/1000,D},
{"listen","listen on HTTP",OFFSET(listen),AV_OPT_TYPE_INT,{.i64=0},0,2,D|E},
{"resource","The resource requested by a client",OFFSET(resource),AV_OPT_TYPE_STRING,{.str=NULL},0,0,E},
{"reply_code","The http status code to return to a client",OFFSET(reply_code),AV_OPT_TYPE_INT,{.i64=200},INT_MIN,599,E},
@ -360,6 +362,7 @@ static int http_open_cnx(URLContext *h, AVDictionary **options)