Fix: No sound is exported with ffmpeg 4.4

We were not assigning the amount of sound channels to the output frames.
Newer ffmpeg releases has sanity checks in place and doesn't fall back
to two channels anymore.
This commit is contained in:
Sebastian Parborg 2021-05-07 16:51:28 +02:00
parent 8241678e6e
commit 9cdf11676e
1 changed files with 1 additions and 0 deletions

View File

@ -164,6 +164,7 @@ static int write_audio_frame(FFMpegContext *context)
frame->pts = context->audio_time / av_q2d(c->time_base);
frame->nb_samples = context->audio_input_samples;
frame->format = c->sample_fmt;
frame->channels = c->channels;
# ifdef FFMPEG_HAVE_FRAME_CHANNEL_LAYOUT
frame->channel_layout = c->channel_layout;
# endif