Unverified Commit 4eb9f660 authored by Francisco Massa's avatar Francisco Massa Committed by GitHub
Browse files

Enable rtmp timeout in decoder (#3076)



Summary:
* Link libav change into fbcode
* Set rw_timeout value

Differential Revision: D23412524

fbshipit-source-id: 5755950be1b1b4c37cb0c3a69a8c875f8862a92c
Co-authored-by: default avatarKeyun Tong <ktong@fb.com>
parent 1b83f46c
...@@ -303,11 +303,14 @@ bool Decoder::init( ...@@ -303,11 +303,14 @@ bool Decoder::init(
inputCtx_->flags |= AVFMT_FLAG_NONBLOCK; inputCtx_->flags |= AVFMT_FLAG_NONBLOCK;
AVDictionary* options = nullptr; AVDictionary* options = nullptr;
av_dict_set_int(&options, "analyzeduration", params_.timeoutMs * 1000, 0);
av_dict_set_int(&options, "stimeout", params_.timeoutMs * 1000, 0);
if (params_.listen) { if (params_.listen) {
av_dict_set_int(&options, "listen", 1, 0); av_dict_set_int(&options, "listen", 1, 0);
} }
if (params_.timeoutMs > 0) {
av_dict_set_int(&options, "analyzeduration", params_.timeoutMs * 1000, 0);
av_dict_set_int(&options, "stimeout", params_.timeoutMs * 1000, 0);
av_dict_set_int(&options, "rw_timeout", params_.timeoutMs * 1000, 0);
}
interrupted_ = false; interrupted_ = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment