Skip to content

Commit

Permalink
idk man
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnut authored Nov 27, 2024
1 parent c000749 commit f722b69
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,23 @@ bool Recorder::init(const RenderSettings& settings) {
return false;
}

// m_convertedFrame = av_frame_alloc();
// m_convertedFrame->format = m_codecContext->pix_fmt;
// m_convertedFrame->width = m_codecContext->width;
// m_convertedFrame->height = m_codecContext->height;
// if(av_image_alloc(m_convertedFrame->data, m_convertedFrame->linesize, m_convertedFrame->width, m_convertedFrame->height, m_codecContext->pix_fmt, 32) < 0) {
// geode::log::error("Could not allocate raw picture buffer.");
// return false;
// }

// m_filteredFrame = av_frame_alloc();
// m_filteredFrame->format = m_codecContext->pix_fmt;
// m_filteredFrame->width = m_codecContext->width;
// m_filteredFrame->height = m_codecContext->height;
// if(av_image_alloc(m_filteredFrame->data, m_filteredFrame->linesize, m_filteredFrame->width, m_filteredFrame->height, m_codecContext->pix_fmt, 32) < 0) {
// geode::log::error("Could not allocate raw picture buffer.");
// return false;
// }
m_convertedFrame = av_frame_alloc();
m_convertedFrame->format = m_codecContext->pix_fmt;
m_convertedFrame->width = m_codecContext->width;
m_convertedFrame->height = m_codecContext->height;
if(av_image_alloc(m_convertedFrame->data, m_convertedFrame->linesize, m_convertedFrame->width, m_convertedFrame->height, m_codecContext->pix_fmt, 32) < 0) {
geode::log::error("Could not allocate raw picture buffer.");
return false;
}

m_filteredFrame = av_frame_alloc();
m_filteredFrame->format = m_codecContext->pix_fmt;
m_filteredFrame->width = m_codecContext->width;
m_filteredFrame->height = m_codecContext->height;
if(av_image_alloc(m_filteredFrame->data, m_filteredFrame->linesize, m_filteredFrame->width, m_filteredFrame->height, m_codecContext->pix_fmt, 32) < 0) {
geode::log::error("Could not allocate raw picture buffer.");
return false;
}

m_packet = new AVPacket();

Expand Down

0 comments on commit f722b69

Please sign in to comment.