[discordcoreapi] Fix compilation with ffmpeg. (#28494)

* [discordcoreapi] Fix compilation with ffmpeg.

* Update versions.
This commit is contained in:
Matthew Oliver 2022-12-29 07:57:42 +11:00 committed by GitHub
parent 23c3f586dd
commit 61eab021ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff --git a/Source/AudioDecoder.cpp b/Source/AudioDecoder.cpp
index 42bd4543..ff210878 100644
--- a/Source/AudioDecoder.cpp
+++ b/Source/AudioDecoder.cpp
@@ -25,7 +25,9 @@
#include <discordcoreapi/Utilities.hpp>
#include <discordcoreapi/AudioDecoder.hpp>
+extern "C" {
#include <libavcodec/avcodec.h>
+}
namespace DiscordCoreInternal {

View File

@ -8,6 +8,8 @@ vcpkg_from_github(
REF c8591ab721b76a7649cb5b45944fab1c5c798242
SHA512 943d2a77dc3d297b4ec84d6b4808554aec9a89c33a242e5f6401a9831f674ff948f53d3e877737a40517a393b3b2a9bd873c6007a193892743c88c2fdb58341a
HEAD_REF main
PATCHES
0001-Add-extern-C-to-avcodec.patch
)
vcpkg_cmake_configure(

View File

@ -1,6 +1,7 @@
{
"name": "discordcoreapi",
"version-date": "2022-12-04",
"port-version": 1,
"description": "A Discord bot library written in C++ using custom asynchronous coroutines.",
"homepage": "https://discordcoreapi.com",
"license": "LGPL-2.1-or-later",

View File

@ -1978,7 +1978,7 @@
},
"discordcoreapi": {
"baseline": "2022-12-04",
"port-version": 0
"port-version": 1
},
"discount": {
"baseline": "2.2.6",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d73e8f486425465e5ea3fe24db81e36cfaf4ac3b",
"version-date": "2022-12-04",
"port-version": 1
},
{
"git-tree": "0832ba20725a822358548dab0fd9c561bf4a78fa",
"version-date": "2022-12-04",