试图解决编译错误

This commit is contained in:
Mike Solar
2025-08-03 22:50:24 +08:00
parent 34d44011f2
commit 994ac94ed2
9 changed files with 46 additions and 19 deletions
+3 -3
View File
@@ -557,10 +557,10 @@ bool FFmpegDecoder::ConformAudioInternal(const QVector<QString> &filenames, cons
return false;
}
// Create resampling context
std::shared_ptr<AVChannelLayout> layout=params.channel_layout();
AVChannelLayout layout=params.channel_layout();
SwrContext* resampler;
swr_alloc_set_opts2(&resampler,
layout.get(),
&layout,
FFmpegUtils::GetFFmpegSampleFormat(params.format()),
params.sample_rate(),
&channel_layout,
@@ -568,7 +568,7 @@ bool FFmpegDecoder::ConformAudioInternal(const QVector<QString> &filenames, cons
instance_.avstream()->codecpar->sample_rate,
0,
nullptr);
av_channel_layout_uninit(&layout);
swr_init(resampler);
AVPacket* pkt = av_packet_alloc();