试图解决编译错误

# Conflicts:
#	app/codec/encoder.cpp
#	app/codec/encoder.h
#	app/codec/ffmpeg/ffmpegdecoder.cpp
#	ext/core
This commit is contained in:
Mike Solar
2025-08-03 22:50:16 +08:00
parent 46a913cc76
commit 34d44011f2
13 changed files with 60 additions and 51 deletions
+4 -3
View File
@@ -116,7 +116,9 @@ bool AudioProcessor::Open(const AudioParams &from, const AudioParams &to, double
}
// Create conversion filter
if (from.sample_rate() != to.sample_rate() || from.channel_layout() != to.channel_layout() || from.format() != to.format()
auto ch1=from.channel_layout();
auto ch2=to.channel_layout();
if (from.sample_rate() != to.sample_rate() || av_channel_layout_compare(&ch1, &ch2) || from.format() != to.format()
|| (to.format().is_planar() && create_tempo)) { // Tempo processor automatically converts to packed,
// so if the desired output is planar, it'll need
// to be converted
@@ -169,8 +171,7 @@ bool AudioProcessor::Open(const AudioParams &from, const AudioParams &to, double
if (in_frame_) {
in_frame_->sample_rate = from.sample_rate();
in_frame_->format = from_fmt_;
in_frame_->channel_layout = from.channel_layout();
in_frame_->channels = from.channel_count();
in_frame_->ch_layout = from.channel_layout();
in_frame_->pts = 0;
} else {
qCritical() << "Failed to allocate input frame";