summaryrefslogtreecommitdiff
path: root/media-video/handbrake/files/handbrake-1.3.3-libhb-fix-audio-encoders-when-linking-to-FFmpeg-4.4.patch
blob: d7cc565377fdbf3dd85d05975e43a6b5afb46ba9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From f28289fb06ab461ea082b4be56d6d1504c0c31c2 Mon Sep 17 00:00:00 2001
From: Damiano Galassi <damiog@gmail.com>
Date: Sat, 10 Apr 2021 13:18:02 +0200
Subject: [PATCH] libhb: fix audio encoders when linking to FFmpeg 4.4.

---
 libhb/encavcodecaudio.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c
index 52fc4565d..e6cf42414 100644
--- a/libhb/encavcodecaudio.c
+++ b/libhb/encavcodecaudio.c
@@ -410,7 +410,10 @@ static void Encode(hb_work_object_t *w, hb_buffer_list_t *list)
 
         // Prepare input frame
         int     out_size;
-        AVFrame frame = { .nb_samples = pv->samples_per_frame, };
+        AVFrame frame = { .nb_samples = pv->samples_per_frame,
+                          .format = pv->context->sample_fmt,
+                          .channels = pv->context->channels
+        };
 
         out_size = av_samples_get_buffer_size(NULL,
                                               pv->context->channels,
-- 
2.26.3