mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 14:40:22 +00:00
audio_frame2::change_ch_count: fix CID 480257
the behavior is now very slightly modified but effectively the same, eg. change 1 to 3 channels copies now channel 0 to 1 and then 1 to 2 (before it copies 0 to both 1 and 2).
This commit is contained in:
@@ -347,8 +347,8 @@ void audio_frame2::change_ch_count(int ch_count)
|
||||
return;
|
||||
}
|
||||
|
||||
const channel &last_ch = channels.at(channels.size() - 1);
|
||||
for (unsigned i = channels.size(); i < (unsigned) ch_count; ++i) {
|
||||
const channel &last_ch = channels.at(channels.size() - 1);
|
||||
std::unique_ptr<char[]> data =
|
||||
std::unique_ptr<char[]>(new char[last_ch.len]);
|
||||
memcpy(data.get(), last_ch.data.get(), last_ch.len);
|
||||
|
||||
Reference in New Issue
Block a user