@@ -129,23 +129,23 @@ bool Recorder::init(const RenderSettings& settings) {
129129 return false ;
130130 }
131131
132- // m_convertedFrame = av_frame_alloc();
133- // m_convertedFrame->format = m_codecContext->pix_fmt;
134- // m_convertedFrame->width = m_codecContext->width;
135- // m_convertedFrame->height = m_codecContext->height;
136- // if(av_image_alloc(m_convertedFrame->data, m_convertedFrame->linesize, m_convertedFrame->width, m_convertedFrame->height, m_codecContext->pix_fmt, 32) < 0) {
137- // geode::log::error("Could not allocate raw picture buffer.");
138- // return false;
139- // }
140-
141- // m_filteredFrame = av_frame_alloc();
142- // m_filteredFrame->format = m_codecContext->pix_fmt;
143- // m_filteredFrame->width = m_codecContext->width;
144- // m_filteredFrame->height = m_codecContext->height;
145- // if(av_image_alloc(m_filteredFrame->data, m_filteredFrame->linesize, m_filteredFrame->width, m_filteredFrame->height, m_codecContext->pix_fmt, 32) < 0) {
146- // geode::log::error("Could not allocate raw picture buffer.");
147- // return false;
148- // }
132+ m_convertedFrame = av_frame_alloc ();
133+ m_convertedFrame->format = m_codecContext->pix_fmt ;
134+ m_convertedFrame->width = m_codecContext->width ;
135+ m_convertedFrame->height = m_codecContext->height ;
136+ if (av_image_alloc (m_convertedFrame->data , m_convertedFrame->linesize , m_convertedFrame->width , m_convertedFrame->height , m_codecContext->pix_fmt , 32 ) < 0 ) {
137+ geode::log::error (" Could not allocate raw picture buffer." );
138+ return false ;
139+ }
140+
141+ m_filteredFrame = av_frame_alloc ();
142+ m_filteredFrame->format = m_codecContext->pix_fmt ;
143+ m_filteredFrame->width = m_codecContext->width ;
144+ m_filteredFrame->height = m_codecContext->height ;
145+ if (av_image_alloc (m_filteredFrame->data , m_filteredFrame->linesize , m_filteredFrame->width , m_filteredFrame->height , m_codecContext->pix_fmt , 32 ) < 0 ) {
146+ geode::log::error (" Could not allocate raw picture buffer." );
147+ return false ;
148+ }
149149
150150 m_packet = new AVPacket ();
151151
0 commit comments