diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-05-11 03:24:57 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-05-11 10:40:20 +0200 |
| commit | 5f7a045d3898332149ecbe3dba7b14ba030da463 (patch) | |
| tree | f232523e376b46a4380214aade3c43e24fa9d08e /src/lib/ffmpeg_decoder.cc | |
| parent | 4b055d1aa3661ba9ec28d425e7692d0adccf02d2 (diff) | |
Remove incorrect silencing (#2526).
On switching to the new FFmpeg send/receive API in
e29ce33a36c2e20444d57196defc86d5072bce81
the channels variable in deinterleave_audio() was switched from
stream channels to frame channels.
I'm not sure if this is right, but it does mean that audio has
`channels` channels, so calling make_silent() up to the stream
channel count is clearly wrong if the stream has more channels
than the frame.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 85f79b513..9f505ea43 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -361,13 +361,9 @@ deinterleave_audio(shared_ptr<FFmpegAudioStream> stream, AVFrame* frame) { auto p = reinterpret_cast<float**> (frame->data); DCPOMATIC_ASSERT(channels <= stream->channels()); - /* Sometimes there aren't as many channels in the frame as in the stream */ for (int i = 0; i < channels; ++i) { memcpy (data[i], p[i], frames * sizeof(float)); } - for (int i = channels; i < stream->channels(); ++i) { - audio->make_silent (i); - } } break; |
