mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 07:52:31 +00:00
Fixed compiler error for av_err2string by redefining in c++ friendly way
This commit is contained in:
parent
9101bd7ad4
commit
577bb66c1f
@ -20,6 +20,18 @@ extern "C" {
|
|||||||
#include <libswscale/swscale.h>
|
#include <libswscale/swscale.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The av_err2str macro in libavutil/error.h does not play nice with C++
|
||||||
|
// More info: https://github.com/joncampbell123/composite-video-simulator/issues/5
|
||||||
|
#ifdef av_err2str
|
||||||
|
#undef av_err2str
|
||||||
|
#include <string>
|
||||||
|
av_always_inline std::string av_err2string(int errnum) {
|
||||||
|
char errbuf[AV_ERROR_MAX_STRING_SIZE];
|
||||||
|
return av_make_error_string(errbuf, AV_ERROR_MAX_STRING_SIZE, errnum);
|
||||||
|
}
|
||||||
|
#define av_err2str(err) av_err2string(err).c_str()
|
||||||
|
#endif // av_err2str
|
||||||
|
|
||||||
namespace Libraries::AvPlayer {
|
namespace Libraries::AvPlayer {
|
||||||
|
|
||||||
using namespace Kernel;
|
using namespace Kernel;
|
||||||
|
Loading…
Reference in New Issue
Block a user