AVFrame * SpeakerCapture: : AllocAudioFrame ()
{
AVFrame * frame=av_frame_alloc ();
if (! Frame)
{
CLog: : GetInstance (). The Log (ENUM_LOG_LEVEL: : enum_Log_Level5, _T (" Could not the allocate frame "));
return NULL;
}
Frame - & gt; Nb_samples=1058;
Frame - & gt; Channels=m_pFrameSrc - & gt; Channels;
Frame - & gt; Channel_layout=av_get_default_channel_layout (m_pFrameSrc - & gt; Channels);
Frame - & gt; Format=m_pCodecCtx - & gt; Sample_fmt;
Frame - & gt; Sample_rate=m_pFrameSrc - & gt; Sample_rate;
Av_frame_get_buffer (frame, 0);
Return the frame;
}
This is to cache avframe temporary variables don't know if this reason, and then use swr_convert resampling, do not know to have good method can eliminate the?
CodePudding user response:
Could you tell me how to solve the problem of the building Lord?CodePudding user response:
There is no