forked from shadps4-emu/shadPS4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix shadps4-emu#1457 again by moving av_err2str to a common head…
…er (shadps4-emu#1688)
- Loading branch information
Showing
5 changed files
with
22 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
#pragma once | ||
|
||
// support header file for libav | ||
|
||
// The av_err2str macro in libavutil/error.h does not play nice with C++ | ||
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters