Skip to content

Commit eea61b2

Browse files
committed
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).
1 parent 94665c5 commit eea61b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/audio/types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ void audio_frame2::change_ch_count(int ch_count)
347347
return;
348348
}
349349

350-
const channel &last_ch = channels.at(channels.size() - 1);
351350
for (unsigned i = channels.size(); i < (unsigned) ch_count; ++i) {
351+
const channel &last_ch = channels.at(channels.size() - 1);
352352
std::unique_ptr<char[]> data =
353353
std::unique_ptr<char[]>(new char[last_ch.len]);
354354
memcpy(data.get(), last_ch.data.get(), last_ch.len);

0 commit comments

Comments
 (0)