diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-09-30 22:46:33 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-28 02:01:38 +0100 |
| commit | c17bcd3bcaced30e4657aab7582ec9efa93b6ea1 (patch) | |
| tree | 0e09a1569b0de20bdc56026d2a7cc098ba0c6a2c /src/lib/ffmpeg_file_encoder.cc | |
| parent | 591c89275bfa26c3b2e1b0f1926909fc4bf5b219 (diff) | |
Bump ffmpeg to 5.1.2 "Riemann"
Diffstat (limited to 'src/lib/ffmpeg_file_encoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_file_encoder.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/ffmpeg_file_encoder.cc b/src/lib/ffmpeg_file_encoder.cc index 6d1ad68f7..d7833265d 100644 --- a/src/lib/ffmpeg_file_encoder.cc +++ b/src/lib/ffmpeg_file_encoder.cc @@ -73,8 +73,7 @@ public: _codec_context->bit_rate = channels * 128 * 1024; _codec_context->sample_fmt = sample_format; _codec_context->sample_rate = frame_rate; - _codec_context->channel_layout = av_get_default_channel_layout (channels); - _codec_context->channels = channels; + av_channel_layout_default(&_codec_context->ch_layout, channels); int r = avcodec_open2 (_codec_context, _codec, 0); if (r < 0) { @@ -143,7 +142,7 @@ public: frame->nb_samples = size; frame->format = _codec_context->sample_fmt; - frame->channels = channels; + frame->ch_layout.nb_channels = channels; int r = avcodec_fill_audio_frame (frame, channels, _codec_context->sample_fmt, (const uint8_t *) samples, buffer_size, 0); DCPOMATIC_ASSERT (r >= 0); |
