Skip to content

Commit

Permalink
patch ffmpeg to prevent redefined symbols in strmiids
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Apr 12, 2024
1 parent 43062f4 commit 1d9a59a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-ffmpeg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ jobs:
git apply -v --ignore-whitespace ../../ffmpeg_patches/ffmpeg/03-amfenc-disable-buffering.patch
git apply -v --ignore-whitespace ../../ffmpeg_patches/ffmpeg/04-mfenc-lowlatency.patch
git apply -v --ignore-whitespace ../../ffmpeg_patches/ffmpeg/05-amfenc-new-av1-usages.patch
git apply -v --ignore-whitespace ../../ffmpeg_patches/ffmpeg/06-prevent-avcodec-dup-symbols.patch
- name: Setup cross compilation
id: cross
Expand Down
31 changes: 31 additions & 0 deletions ffmpeg_patches/ffmpeg/06-prevent-avcodec-dup-symbols.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Subject: [PATCH] trying to patch ffmpeg
---
Index: libavcodec/mf_utils.h
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libavcodec/mf_utils.h b/libavcodec/mf_utils.h
--- a/libavcodec/mf_utils.h (revision 41f32f0bc42490c007920cf7b844f7a84852b201)
+++ b/libavcodec/mf_utils.h (date 1712917933957)
@@ -21,20 +21,7 @@

#include <windows.h>
#include <initguid.h>
-#ifdef _MSC_VER
-// The official way of including codecapi (via dshow.h) makes the ICodecAPI
-// interface unavailable in UWP mode, but including icodecapi.h + codecapi.h
-// seems to be equivalent. (These headers conflict with the official way
-// of including it though, through strmif.h via dshow.h. And on mingw, the
-// mf*.h headers below indirectly include strmif.h.)
#include <icodecapi.h>
-#else
-#define NO_DSHOW_STRSAFE
-#include <dshow.h>
-// Older versions of mingw-w64 need codecapi.h explicitly included, while newer
-// ones include it implicitly from dshow.h (via uuids.h).
-#include <codecapi.h>
-#endif
#include <mfapi.h>
#include <mferror.h>
#include <mfobjects.h>

0 comments on commit 1d9a59a

Please sign in to comment.