提交 f04be519 编写于 作者: K kc5nra 提交者: John Bradley

obs-ffmpeg: Set channel layout to avoid warning

上级 aa82340a
......@@ -309,6 +309,8 @@ static bool create_audio_stream(struct ffmpeg_data *data)
context->time_base = (AVRational){ 1, aoi.samples_per_sec };
context->channels = get_audio_channels(aoi.speakers);
context->sample_rate = aoi.samples_per_sec;
context->channel_layout =
av_get_default_channel_layout(context->channels);
context->sample_fmt = data->acodec->sample_fmts ?
data->acodec->sample_fmts[0] : AV_SAMPLE_FMT_FLTP;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册