mirror of
https://github.com/opencv/opencv.git
synced 2024-12-04 00:39:11 +08:00
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.
This commit is contained in:
parent
d5ecb5ff5a
commit
76aff84788
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user