FFmpegUtilities: inline av_make_error_string

Avoids warnings about the function being unused, if compiling
with `-Wall`

Borrowed from:
222f145230/src/zm_ffmpeg.h (L241)
This commit is contained in:
FeRD (Frank Dana)
2019-07-03 03:33:52 -04:00
parent 1b19ae7fe4
commit db51ea1ee0

View File

@@ -91,12 +91,11 @@
#endif
// This wraps an unsafe C macro to be C++ compatible function
static const std::string av_make_error_string(int errnum)
inline static const std::string av_make_error_string(int errnum)
{
char errbuf[AV_ERROR_MAX_STRING_SIZE];
av_strerror(errnum, errbuf, AV_ERROR_MAX_STRING_SIZE);
std::string errstring(errbuf);
return errstring;
return (std::string)errbuf;
}
// Redefine the C macro to use our new C++ function