diff -pruN 1.5.1+ds1-1/debian/changelog 1.5.1+ds1-2/debian/changelog
--- 1.5.1+ds1-1/debian/changelog	2022-01-15 16:18:42.000000000 +0000
+++ 1.5.1+ds1-2/debian/changelog	2022-07-30 20:53:28.000000000 +0000
@@ -1,3 +1,11 @@
+handbrake (1.5.1+ds1-2) unstable; urgency=medium
+
+  * debian/patches: Apply upstream patch to fix build with ffmpeg 5.0 (Closes:
+    #1004828)
+  * debian/control: Bump Standards-Version
+
+ -- Sebastian Ramacher <sramacher@debian.org>  Sat, 30 Jul 2022 22:53:28 +0200
+
 handbrake (1.5.1+ds1-1) unstable; urgency=medium
 
   * New upstream version 1.5.1+ds1
diff -pruN 1.5.1+ds1-1/debian/control 1.5.1+ds1-2/debian/control
--- 1.5.1+ds1-1/debian/control	2022-01-15 15:47:10.000000000 +0000
+++ 1.5.1+ds1-2/debian/control	2022-07-30 20:53:18.000000000 +0000
@@ -8,7 +8,7 @@ Uploaders:
 Homepage: https://handbrake.fr/
 Vcs-Git: https://salsa.debian.org/multimedia-team/handbrake.git
 Vcs-Browser: https://salsa.debian.org/multimedia-team/handbrake
-Standards-Version: 4.6.0
+Standards-Version: 4.6.1
 Build-Depends:
  automake,
  cmake,
diff -pruN 1.5.1+ds1-1/debian/patches/0003-libhb-include-bsf.h-header-to-fix-build-with-FFmpeg-.patch 1.5.1+ds1-2/debian/patches/0003-libhb-include-bsf.h-header-to-fix-build-with-FFmpeg-.patch
--- 1.5.1+ds1-1/debian/patches/0003-libhb-include-bsf.h-header-to-fix-build-with-FFmpeg-.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1.5.1+ds1-2/debian/patches/0003-libhb-include-bsf.h-header-to-fix-build-with-FFmpeg-.patch	2022-07-30 20:53:18.000000000 +0000
@@ -0,0 +1,42 @@
+From 024fae65f53de516161c36e16f2c1ae6f4d3f4dd Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Mon, 17 Jan 2022 09:32:11 +0100
+Subject: [PATCH] libhb: include bsf.h header to fix build with FFmpeg >= 5
+ (#4106)
+
+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 372f86f82..e7a63289c 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 232edd094..ad8e2a1d8 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"
+-- 
+2.34.1
+
diff -pruN 1.5.1+ds1-1/debian/patches/series 1.5.1+ds1-2/debian/patches/series
--- 1.5.1+ds1-1/debian/patches/series	2022-01-15 15:47:10.000000000 +0000
+++ 1.5.1+ds1-2/debian/patches/series	2022-07-30 20:53:18.000000000 +0000
@@ -1,2 +1,3 @@
 0001-Remove-embedded-downloaded-copies-of-various-librari.patch
 0002-Do-not-abort-if-libtool-meson-or-ninja-build-are-mis.patch
+0003-libhb-include-bsf.h-header-to-fix-build-with-FFmpeg-.patch
