AVDictionary *opts = NULL; AVFormatContext *ctx = NULL; av_dict_set(&opts, "stimeout", std::to_string(mStartingTTLInSec * 1000000).c_str(), 0); int ret = avformat_open_input(&ctx, szFilePath, NULL, &opts);
My code is working, I just want to know the error code to check if avformat_open_input was failed because of “stimeout”.
I see FFMpeg log in console
(tcp @ 0x55bc74f20080) Connection to tcp://184.108.40.206:22692?timeout=4000000 failed: Connection timed out
But I need to react to it in code.