diff --git a/plugins/win-dshow/win-dshow.cpp b/plugins/win-dshow/win-dshow.cpp index 03bdbba91..804a393a7 100644 --- a/plugins/win-dshow/win-dshow.cpp +++ b/plugins/win-dshow/win-dshow.cpp @@ -671,12 +671,12 @@ static inline bool CapsMatch(const VideoInfo &info, F&& f, Fs ... fs) template static bool CapsMatch(const VideoDevice &dev, F ... fs) { - auto matcher = [&](const VideoInfo &info) - { - return CapsMatch(info, fs ...); - }; - - return any_of(begin(dev.caps), end(dev.caps), matcher); + // no early exit, trigger all side effects. + bool match = false; + for (const VideoInfo &info : dev.caps) + if (CapsMatch(info, fs ...)) + match = true; + return match; } static inline bool MatcherMatchVideoFormat(VideoFormat format,