We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c74e340 commit 93374f7Copy full SHA for 93374f7
1 file changed
src/recorder.cpp
@@ -73,6 +73,12 @@ geode::Result<> Recorder::Impl::init(const RenderSettings& settings) {
73
74
if (const AVPixelFormat *pix_fmt = m_codec->pix_fmts) {
75
while (*pix_fmt != AV_PIX_FMT_NONE) {
76
+ if(*pix_fmt == AV_PIX_FMT_MEDIACODEC) {
77
+ // secretly force pix fmt to nv12. seems to work contrary to yuv420p.
78
+ // with AV_PIX_FMT_MEDIACODEC mediacodec would go into surface mode and expect a surface
79
+ m_codecContext->pix_fmt = AV_PIX_FMT_NV12;
80
+ break;
81
+ }
82
if(*pix_fmt == static_cast<AVPixelFormat>(settings.m_pixelFormat))
83
m_codecContext->pix_fmt = *pix_fmt;
84
++pix_fmt;
0 commit comments