win-dshow: Fix stack overflow bug

Martell changed this function without realizing that this was calling a
function below it, not recursively calling itself.  The reason why he
got the warning was because there was no forward declaration of the
function that was being called; I think he's used to C where only one
function definition can exist with the same name.  In this case, it was
another function with the same name but with different parameters,
something that's permitted in C++.  I wish I had realized this sooner.

This fixes the crashes people have been having with devices.
This commit is contained in:
jp9000
2015-02-11 13:10:54 -08:00
parent ba3cac938a
commit 7e0a86e583
+4 -1
View File
@@ -569,10 +569,13 @@ static inline bool ResolutionValid(string res, int &cx, int &cy)
return ConvertRes(cx, cy, res.c_str());
}
template <typename ... F>
static bool CapsMatch(const VideoDevice &dev, F ... fs);
template <typename F, typename ... Fs>
static inline bool CapsMatch(const VideoInfo &info, F&& f, Fs ... fs)
{
return f(info) && CapsMatch(info, f, fs ...);
return f(info) && CapsMatch(info, fs ...);
}
static inline bool CapsMatch(const VideoInfo&)