diff -pruN 1.3.0-3/debian/changelog 1.3.0-3ubuntu1/debian/changelog
--- 1.3.0-3/debian/changelog	2021-08-12 14:53:40.000000000 +0000
+++ 1.3.0-3ubuntu1/debian/changelog	2021-12-17 14:50:51.000000000 +0000
@@ -1,3 +1,10 @@
+libyami-utils (1.3.0-3ubuntu1) jammy; urgency=medium
+
+  * d/p/av_packet_init-deprecated.patch: fix FTBFS against newer FFMPeg
+    (Closes: #993379)
+
+ -- Simon Chopin <simon.chopin@canonical.com>  Fri, 17 Dec 2021 15:50:51 +0100
+
 libyami-utils (1.3.0-3) unstable; urgency=medium
 
   [ Debian Janitor ]
diff -pruN 1.3.0-3/debian/control 1.3.0-3ubuntu1/debian/control
--- 1.3.0-3/debian/control	2021-08-12 14:49:15.000000000 +0000
+++ 1.3.0-3ubuntu1/debian/control	2021-12-17 14:50:51.000000000 +0000
@@ -1,7 +1,8 @@
 Source: libyami-utils
 Section: utils
 Priority: optional
-Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
 Uploaders: Xu Guagnxin <Guangxin.Xu@intel.com>
 Build-Depends:
  debhelper-compat (= 13),
diff -pruN 1.3.0-3/debian/patches/0004-tests-decodeinputavformat-use-heap-allocated-m_packe.patch 1.3.0-3ubuntu1/debian/patches/0004-tests-decodeinputavformat-use-heap-allocated-m_packe.patch
--- 1.3.0-3/debian/patches/0004-tests-decodeinputavformat-use-heap-allocated-m_packe.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1.3.0-3ubuntu1/debian/patches/0004-tests-decodeinputavformat-use-heap-allocated-m_packe.patch	2021-12-17 14:50:51.000000000 +0000
@@ -0,0 +1,85 @@
+From dbd0c5508d0084a9b069cafd583e6004a12f562a Mon Sep 17 00:00:00 2001
+From: Simon Chopin <simon.chopin@canonical.com>
+Date: Fri, 17 Dec 2021 16:03:10 +0100
+Subject: [PATCH] tests/decodeinputavformat: use heap-allocated m_packet
+Forwarded: https://github.com/intel/libyami-utils/pull/138
+
+This allows us to migrate away from av_init_packet() which has been
+deprecated in recent FFMpeg, making the build fail.
+
+This implementation is somewhat rough, there's probably a way to avoid
+reallocating the packet each iteration, but it does the job.
+---
+ tests/decodeinputavformat.cpp | 23 +++++++++--------------
+ tests/decodeinputavformat.h   |  2 +-
+ 2 files changed, 10 insertions(+), 15 deletions(-)
+
+--- a/tests/decodeinputavformat.cpp
++++ b/tests/decodeinputavformat.cpp
+@@ -22,18 +22,12 @@
+ #include "common/log.h"
+ #include <Yami.h>
+ 
+-#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 39, 100)
+-#define av_packet_unref av_free_packet
+-#endif
+-
+ DecodeInputAvFormat::DecodeInputAvFormat()
+-:m_format(NULL),m_videoId(-1), m_codecId(AV_CODEC_ID_NONE), m_isEos(true)
++:m_format(NULL),m_videoId(-1), m_codecId(AV_CODEC_ID_NONE), m_packet(av_packet_alloc()), m_isEos(true)
+ {
+ #if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)
+     av_register_all();
+ #endif
+-
+-    av_init_packet(&m_packet);
+ }
+ 
+ bool DecodeInputAvFormat::initInput(const char* fileName)
+@@ -132,18 +126,19 @@
+     int ret;
+     while (1) {
+         //free old packet
+-        av_packet_unref(&m_packet);
++        av_packet_free(&m_packet);
++        m_packet = av_packet_alloc();
+ 
+-        ret = av_read_frame(m_format, &m_packet);
++        ret = av_read_frame(m_format, m_packet);
+         if (ret) {
+             m_isEos = true;
+             return false;
+         }
+-        if (m_packet.stream_index == m_videoId) {
++        if (m_packet->stream_index == m_videoId) {
+             memset(&inputBuffer, 0, sizeof(inputBuffer));
+-            inputBuffer.data = m_packet.data;
+-            inputBuffer.size = m_packet.size;
+-            inputBuffer.timeStamp = m_packet.dts;
++            inputBuffer.data = m_packet->data;
++            inputBuffer.size = m_packet->size;
++            inputBuffer.timeStamp = m_packet->dts;
+             return true;
+         }
+     }
+@@ -158,8 +153,8 @@
+ DecodeInputAvFormat::~DecodeInputAvFormat()
+ {
+     if (m_format) {
+-        av_packet_unref(&m_packet);
+         avformat_close_input(&m_format);
+     }
++    av_packet_free(&m_packet);
+ 
+ }
+--- a/tests/decodeinputavformat.h
++++ b/tests/decodeinputavformat.h
+@@ -47,7 +47,7 @@
+     AVFormatContext* m_format;
+     int m_videoId;
+     AVCodecID m_codecId;
+-    AVPacket m_packet;
++    AVPacket* m_packet;
+     bool m_isEos;
+     string m_codecData;
+ };
diff -pruN 1.3.0-3/debian/patches/series 1.3.0-3ubuntu1/debian/patches/series
--- 1.3.0-3/debian/patches/series	2021-08-12 14:52:14.000000000 +0000
+++ 1.3.0-3ubuntu1/debian/patches/series	2021-12-17 14:50:51.000000000 +0000
@@ -1,3 +1,4 @@
 0001-decode-avformat-av_register_all-is-deprecated-since-.patch
 0002-decode-avformat-use-LIBAVFORMAT_VERSION_INT-instead.patch
 0003-Use-libmd-instead-of-libbsd-for-message-digest-funct.patch
+0004-tests-decodeinputavformat-use-heap-allocated-m_packe.patch
