From 95675c23bf42179da7f08042e60d9e98931df382 Mon Sep 17 00:00:00 2001 From: Damiano Galassi 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 52fc4565d8fd..e6cf424144f9 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,