only skip assert and force start if OMX_ErrorInsufficientResources

This commit is contained in:
Jason Wen
2024-04-12 00:39:56 -04:00
parent 452808f550
commit 33f0bd323b
@@ -330,10 +330,14 @@ OmxEncoder::OmxEncoder(const char* path, int width, int height, int fps, int bit
int err = OMX_GetHandle(&this->handle, component, this, &omx_callbacks);
if (err != OMX_ErrorNone) {
LOGE("error getting codec: %x", err);
}
// TODO: Investigate the insufficient memory issue in prebuilts, we force quit Qt UI, and trigger fast restart for now
if (err == OMX_ErrorInsufficientResources) {
qApp->exit(18);
watchdog_kick(0);
} else {
assert(err == OMX_ErrorNone);
}
// assert(err == OMX_ErrorNone); // TODO: Investigate the insufficient memory issue in prebuilts
// printf("handle: %p\n", this->handle);
// setup input port