Skip to content

Commit

Permalink
{telegram-desktop,kotatogram-desktop}.tg_owt: add patch for FFmpeg 7
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
emilazy committed Sep 9, 2024
1 parent d41db30 commit 6f94d89
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, pkg-config
, cmake
, ninja
Expand Down Expand Up @@ -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"' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
pkg-config,
cmake,
crc32c,
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 6f94d89

Please sign in to comment.