python312Packages.types-aiobotocore: 2.15.2 -> 2.15.2.post3 (#361801)
[NixPkgs.git] / pkgs / by-name / sh / shadps4 / av_err2str_macro.patch
blobcb4507b6a35c8aa765387c32891cc1d32c1eed36
1 diff --git a/src/core/libraries/videodec/videodec2_impl.cpp b/src/core/libraries/videodec/videodec2_impl.cpp
2 index 021965e..31eb537 100644
3 --- a/src/core/libraries/videodec/videodec2_impl.cpp
4 +++ b/src/core/libraries/videodec/videodec2_impl.cpp
5 @@ -8,6 +8,16 @@
6 #include "common/logging/log.h"
7 #include "core/libraries/error_codes.h"
9 +#ifdef av_err2str
10 +#undef av_err2str
11 +#include <string>
12 +av_always_inline std::string av_err2string(int errnum) {
13 + char errbuf[AV_ERROR_MAX_STRING_SIZE];
14 + return av_make_error_string(errbuf, AV_ERROR_MAX_STRING_SIZE, errnum);
15 +}
16 +#define av_err2str(err) av_err2string(err).c_str()
17 +#endif // av_err2str
19 namespace Libraries::Vdec2 {
21 std::vector<OrbisVideodec2AvcPictureInfo> gPictureInfos;
22 @@ -225,4 +235,4 @@ AVFrame* VdecDecoder::ConvertNV12Frame(AVFrame& frame) {
23 return nv12_frame;
26 -} // namespace Libraries::Vdec2
27 \ No newline at end of file
28 +} // namespace Libraries::Vdec2