From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1359108-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 7B316158087
	for <garchives@archives.gentoo.org>; Wed, 19 Jan 2022 01:16:03 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0915B2BC013;
	Wed, 19 Jan 2022 01:16:02 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id D51102BC00C
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Jan 2022 01:16:01 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id B0A47342CFB
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Jan 2022 01:16:00 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 61B5D29B
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Jan 2022 01:15:59 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1642554928.0ad18e0ac69d1dc63a3bef23a81ae347a396d279.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/handbrake/, media-video/handbrake/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-video/handbrake/files/handbrake-1.5.1-ffmpeg-5.0.patch media-video/handbrake/handbrake-1.5.1.ebuild
X-VCS-Directories: media-video/handbrake/ media-video/handbrake/files/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 0ad18e0ac69d1dc63a3bef23a81ae347a396d279
X-VCS-Branch: master
Date: Wed, 19 Jan 2022 01:15:59 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: eaf44b41-8f4d-4bca-81ab-6218ce224344
X-Archives-Hash: 3c95b719a790dcdf8abb681541938baf

commit:     0ad18e0ac69d1dc63a3bef23a81ae347a396d279
Author:     James Beddek <telans <AT> posteo <DOT> de>
AuthorDate: Sun Jan 16 03:47:00 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 19 01:15:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ad18e0a

media-video/handbrake: add ffmpeg 5.0 patch

Signed-off-by: James Beddek <telans <AT> posteo.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/handbrake-1.5.1-ffmpeg-5.0.patch         | 40 ++++++++++++++++++++++
 media-video/handbrake/handbrake-1.5.1.ebuild       |  3 ++
 2 files changed, 43 insertions(+)

diff --git a/media-video/handbrake/files/handbrake-1.5.1-ffmpeg-5.0.patch b/media-video/handbrake/files/handbrake-1.5.1-ffmpeg-5.0.patch
new file mode 100644
index 000000000000..643605076294
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-1.5.1-ffmpeg-5.0.patch
@@ -0,0 +1,40 @@
+# https://git.exherbo.org/media.git/commit/?id=b7a022928103184b7528d0e40ad0a4edcfbbd7a4
+
+From 8a9d11e96b771422247c458ae6b07f3a13848f3a Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Sat, 15 Jan 2022 20:44:53 +0100
+Subject: [PATCH] FFmpeg deprecations fixes for FFmpeg >= 5
+
+avcodec.h stopped including bsf.h per FFmpeg commit
+57b5ec6ba7df [1]. Fixes compilation error against
+FFmpeg later than the mentioned commit.
+[1] https://github.com/FFmpeg/FFmpeg/commit/57b5ec6ba7df442caebc401c4a7ef3ebc066b519
+---
+ libhb/decavcodec.c  | 1 +
+ libhb/muxavformat.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
+index 372f86f82cf..e7a63289c0f 100644
+--- a/libhb/decavcodec.c
++++ b/libhb/decavcodec.c
+@@ -41,6 +41,7 @@
+ #include "handbrake/handbrake.h"
+ #include "handbrake/hbffmpeg.h"
+ #include "handbrake/hbavfilter.h"
++#include "libavcodec/bsf.h"
+ #include "libavfilter/avfilter.h"
+ #include "libavfilter/buffersrc.h"
+ #include "libavfilter/buffersink.h"
+diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
+index 232edd0942a..ad8e2a1d8fa 100644
+--- a/libhb/muxavformat.c
++++ b/libhb/muxavformat.c
+@@ -8,6 +8,7 @@
+  */
+ 
+ #include <ogg/ogg.h>
++#include "libavcodec/bsf.h"
+ #include "libavformat/avformat.h"
+ #include "libavutil/avstring.h"
+ #include "libavutil/intreadwrite.h"

diff --git a/media-video/handbrake/handbrake-1.5.1.ebuild b/media-video/handbrake/handbrake-1.5.1.ebuild
index e8bee8b1fe39..c5f8eebf74a2 100644
--- a/media-video/handbrake/handbrake-1.5.1.ebuild
+++ b/media-video/handbrake/handbrake-1.5.1.ebuild
@@ -96,6 +96,9 @@ PATCHES=(
 
 	# Fix x265 linkage... again again #730034
 	"${FILESDIR}/${PN}-1.3.3-x265-link.patch"
+
+	# Fix compatability with ffmpeg-5.0
+	"${FILESDIR}/${PN}-1.5.1-ffmpeg-5.0.patch"
 )
 
 src_prepare() {