Skip to content

Commit

Permalink
y4m出力時のヘッダの修正。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Nov 22, 2024
1 parent 81472bf commit da7a74d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion NVEncCore/rgy_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,13 @@ RGY_ERR RGYOutFrame::WriteNextFrame(RGYFrame *pSurface) {

if (m_bY4m) {
if (!m_y4mHeaderWritten) {
WriteY4MHeader(m_fDest.get(), &m_VideoOutputInfo, pSurface->csp());
auto csp = pSurface->csp();
if (csp == RGY_CSP_NV12) {
csp = RGY_CSP_YV12;
} else if (csp == RGY_CSP_P010) {
csp = RGY_CSP_YV12_16;
}
WriteY4MHeader(m_fDest.get(), &m_VideoOutputInfo, csp);
m_y4mHeaderWritten = true;
}
WRITE_CHECK(fwrite("FRAME\n", 1, strlen("FRAME\n"), m_fDest.get()), strlen("FRAME\n"));
Expand Down

0 comments on commit da7a74d

Please sign in to comment.