Merge pull request #26793 from UnnamedOrange:4.x

Fix an is-empty condition in FFmpeg video capture when parsing FFmpeg options defined in the environment variables
This commit is contained in:
Alexander Smorkalov
2025-01-20 11:30:42 +03:00
committed by GitHub

View File

@@ -1137,7 +1137,7 @@ bool CvCapture_FFMPEG::open(const char* _filename, const Ptr<IStreamReader>& str
#endif
std::string options = utils::getConfigurationParameterString("OPENCV_FFMPEG_CAPTURE_OPTIONS");
if(!options.empty())
if (options.empty())
{
#if LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 48, 100)
av_dict_set(&dict, "rtsp_flags", "prefer_tcp", 0);