{telegram-desktop,kotatogram-desktop}.tg_owt: add patch for FFmpeg 7

These are forks of WebRTC, so include the same upstream patch we use
for FFmpeg 7 support in Qt 5’s WebEngine.

I didn’t bother deduplicating it across these two copy‐pasted
expressions since the original authors didn’t either.
This commit is contained in:
Emily
2024-09-10 15:14:58 +01:00
parent a149bd4768
commit b1a93bb5c4
2 changed files with 26 additions and 0 deletions
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, pkg-config
, cmake
, ninja
@@ -42,6 +43,18 @@ stdenv.mkDerivation {
fetchSubmodules = true;
};
patches = [
# Remove usage of AVCodecContext::reordered_opaque
(fetchpatch2 {
name = "webrtc-ffmpeg-7.patch";
url = "https://webrtc.googlesource.com/src/+/e7d10047096880feb5e9846375f2da54aef91202%5E%21/?format=TEXT";
decode = "base64 -d";
stripLen = 1;
extraPrefix = "src/";
hash = "sha256-EdwHeVko8uDsP5GTw2ryWiQgRVCAdPc1me6hySdiwMU=";
})
];
postPatch = lib.optionalString stdenv.isLinux ''
substituteInPlace src/modules/desktop_capture/linux/wayland/egl_dmabuf.cc \
--replace '"libEGL.so.1"' '"${libGL}/lib/libEGL.so.1"' \
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
pkg-config,
cmake,
crc32c,
@@ -41,6 +42,18 @@ stdenv.mkDerivation {
fetchSubmodules = true;
};
patches = [
# Remove usage of AVCodecContext::reordered_opaque
(fetchpatch2 {
name = "webrtc-ffmpeg-7.patch";
url = "https://webrtc.googlesource.com/src/+/e7d10047096880feb5e9846375f2da54aef91202%5E%21/?format=TEXT";
decode = "base64 -d";
stripLen = 1;
extraPrefix = "src/";
hash = "sha256-EdwHeVko8uDsP5GTw2ryWiQgRVCAdPc1me6hySdiwMU=";
})
];
outputs = [
"out"
"dev"