[FFmpeg-devel] TCP timeout for HTTP/HTTPS connections.

Tom Gaudasiński tomg at records.headdesk.com.au
Mon Nov 18 09:37:12 EET 2019


That seems to change the call-stack a bit, but it still gets stuck on
something in hls.c.

I'm looking into what it is. I've also tried connect_timeout.

I really just need to terminate the av_read_frame call, so that it
returns immediately when I need it to, but av_read_frame appears to
reconnect internally.


On 18/11/19 6:02 pm, Steven Liu wrote:
>
>> 在 2019年11月18日,14:56,Tom Gaudasiński <tomg at records.headdesk.com.au> 写道:
>>
>> I'm trying to set a read timeout for a http/https stream through the
>> API. Currently I'm passing...
>>
>>       av_dict_set(&options, "timeout", "100000", 0);
>>
>> ... to avformat_open_input().
>>
>> This appears to not work once the connection has been established. The
>> protocol call-stack appears to be
>>
>> hls.c -> http.c -> avio.c -> tcp.c -> network.c
> What about use rw_timeout ?
>> The issue, I think, is that tcp.c only gets it's timeout from a
>> ?key=val&key=val  string at the end of the URL supplied to tcp.c, but
>> http.c or avio.c don't supply this. In fact, when I see what was passed
>> down, it's just "tcp://hostname.tld:80".
>>
>> Am I missing something? Is there a way to get ffmpeg to set tcp-timeout
>> from the very top-level API calls? I can't see it.
>>
>> Thank you.
>>
>> --Tom G.
>>
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> Thanks
> Steven
>
>
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".




More information about the ffmpeg-devel mailing list