neatvnc: fixed build with ffmpeg 7.1

This commit is contained in:
Tim Biermann 2024-10-18 16:16:40 +02:00
parent 51d147cede
commit ec25b9f7f2
Signed by untrusted user: tb
GPG Key ID: 42F8B4E30B673606
3 changed files with 20 additions and 3 deletions

View File

@ -1,5 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF36PDs4pDyfX/QTfOluh6SuaRm6cNb+2724JTfNjGENi8jR2PrGjAiNMSjcSDUt0h3f69BldV3MgjtNASCovi3wI=
SHA256 (Pkgfile) = 6c1866128156626aabe760bb8f14c702154620fd14127756251de5f521fb9d5e
RWSagIOpLGJF3xVs/zYMieuM6tfEpcLV4kCBomCaHhk3oaeZ1X0Wma6HEg6INGUKHLDKyHVwNcHPbtYMLUR1ZBQByhw/0OX4NA4=
SHA256 (Pkgfile) = f1f54ed6b9c8b1a5a1b24920a01cc416219efd1a8675bf4c38f04cb5ea46d38a
SHA256 (.footprint) = 4f17d2459b08f63ad8393b37bc4acd5280ff0e86706a03352252c9f47b148b9b
SHA256 (neatvnc-0.8.1.tar.gz) = 51ef4d02f1621c947d58f2454e8fd4582a66439f09d409c103424c9d34839757
SHA256 (ffmpeg-7.1.patch) = c7c41ddb7c1710fb77636ed7cba0452857d3d88f6940190ad1badf8bd82be3b8

View File

@ -7,9 +7,12 @@
name=neatvnc
version=0.8.1
release=1
source=(https://github.com/any1/neatvnc/archive/v$version/$name-$version.tar.gz)
source=(https://github.com/any1/neatvnc/archive/v$version/$name-$version.tar.gz
ffmpeg-7.1.patch)
build() {
patch -Np1 -d $name-$version -i $SRC/ffmpeg-7.1.patch
prt-get isinst gnutls && PKGMK_NEATVNC+=' -D jpeg=enabled'
prt-get isinst libjpeg-turbo && PKGMK_NEATVNC+=' -D jpeg=enabled'
prt-get isinst nettle && PKGMK_NEATVNC+=' -D nettle=enabled'

13
neatvnc/ffmpeg-7.1.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/src/h264-encoder.c b/src/h264-encoder.c
index 6ad0262..f4a4421 100644
--- a/src/h264-encoder.c
+++ b/src/h264-encoder.c
@@ -547,7 +547,7 @@ struct h264_encoder* h264_encoder_create(uint32_t width, uint32_t height,
goto codec_context_failure;
self->codec_ctx->hw_frames_ctx =
- av_buffer_ref(self->filter_out->inputs[0]->hw_frames_ctx);
+ av_buffer_ref(av_buffersink_get_hw_frames_ctx(self->filter_out));
AVDictionary *opts = NULL;
av_dict_set_int(&opts, "async_depth", 1, 0);