Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/core/video_format.h b/src/core/video_format.h
- index 3c90f85..179c114 100644
- --- a/src/core/video_format.h
- +++ b/src/core/video_format.h
- @@ -84,7 +84,7 @@ struct video_format_desc final
- std::size_t size; // frame size in bytes
- std::wstring name; // name of output format
- - int audio_channels = 8;
- + int audio_channels = 16;
- int audio_sample_rate;
- std::vector<int> audio_cadence; // rotating optimal number of samples per frame
- diff --git a/src/modules/ffmpeg/util/av_util.cpp b/src/modules/ffmpeg/util/av_util.cpp
- index 96d5354..515fc0f 100644
- --- a/src/modules/ffmpeg/util/av_util.cpp
- +++ b/src/modules/ffmpeg/util/av_util.cpp
- @@ -63,12 +63,12 @@ core::mutable_frame make_frame(void* tag,
- if (audio) {
- // TODO This is a bit of a hack
- - frame.audio_data() = std::vector<int32_t>(audio->nb_samples * 8, 0);
- + frame.audio_data() = std::vector<int32_t>(audio->nb_samples * 16, 0);
- auto dst = frame.audio_data().data();
- auto src = reinterpret_cast<int32_t*>(audio->data[0]);
- tbb::parallel_for(0, audio->nb_samples, [&](int i) {
- - for (auto j = 0; j < std::min(8, audio->channels); ++j) {
- - dst[i * 8 + j] = src[i * audio->channels + j];
- + for (auto j = 0; j < std::min(16, audio->channels); ++j) {
- + dst[i * 16 + j] = src[i * audio->channels + j];
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment