mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix video recorder (follow-up to 83c820db
)
This commit is contained in:
parent
c6a0698805
commit
42f1aba2c3
|
@ -534,10 +534,10 @@ void CVideo::OpenAudio()
|
||||||
/* set options */
|
/* set options */
|
||||||
av_opt_set_int(m_AudioStream.pSwrCtx, "in_channel_count", 2, 0);
|
av_opt_set_int(m_AudioStream.pSwrCtx, "in_channel_count", 2, 0);
|
||||||
av_opt_set_int(m_AudioStream.pSwrCtx, "in_sample_rate", g_Config.m_SndRate, 0);
|
av_opt_set_int(m_AudioStream.pSwrCtx, "in_sample_rate", g_Config.m_SndRate, 0);
|
||||||
av_opt_set_sample_fmt(m_AudioStream.pSwrCtx, "in_SampleFmt", AV_SAMPLE_FMT_S16, 0);
|
av_opt_set_sample_fmt(m_AudioStream.pSwrCtx, "in_sample_fmt", AV_SAMPLE_FMT_S16, 0);
|
||||||
av_opt_set_int(m_AudioStream.pSwrCtx, "out_channel_count", c->channels, 0);
|
av_opt_set_int(m_AudioStream.pSwrCtx, "out_channel_count", c->channels, 0);
|
||||||
av_opt_set_int(m_AudioStream.pSwrCtx, "out_sample_rate", c->sample_rate, 0);
|
av_opt_set_int(m_AudioStream.pSwrCtx, "out_sample_rate", c->sample_rate, 0);
|
||||||
av_opt_set_sample_fmt(m_AudioStream.pSwrCtx, "out_SampleFmt", c->sample_fmt, 0);
|
av_opt_set_sample_fmt(m_AudioStream.pSwrCtx, "out_sample_fmt", c->sample_fmt, 0);
|
||||||
|
|
||||||
/* initialize the resampling context */
|
/* initialize the resampling context */
|
||||||
if((Ret = swr_init(m_AudioStream.pSwrCtx)) < 0) {
|
if((Ret = swr_init(m_AudioStream.pSwrCtx)) < 0) {
|
||||||
|
|
Loading…
Reference in a new issue