diff --git a/include/FFmpegUtilities.h b/include/FFmpegUtilities.h index e3df704b..8a0b7705 100644 --- a/include/FFmpegUtilities.h +++ b/include/FFmpegUtilities.h @@ -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