未验证 提交 76aff847 编写于 作者: C cudawarped 提交者: GitHub

Merge pull request #21561 from cudawarped:ffmpeg_prefer_tcp_default

Default FFMPEG VideoCapture backend to rtsp_flags=prefer_tcp

* Make the VideoCapture ffmpeg backends default rtsp connection type prefer_tcp.

* Ensure that the ffmpeg version of avformat is checked.
上级 d5ecb5ff
......@@ -980,7 +980,11 @@ bool CvCapture_FFMPEG::open(const char* _filename, const VideoCaptureParameters&
char* options = getenv("OPENCV_FFMPEG_CAPTURE_OPTIONS");
if(options == NULL)
{
#if LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 48, 100)
av_dict_set(&dict, "rtsp_flags", "prefer_tcp", 0);
#else
av_dict_set(&dict, "rtsp_transport", "tcp", 0);
#endif
}
else
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册