From 33f0bd323b4ae93221d5dcd996650ae5fab72cbf Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Fri, 12 Apr 2024 00:39:56 -0400 Subject: [PATCH] only skip assert and force start if OMX_ErrorInsufficientResources --- selfdrive/ui/qt/screenrecorder/omx_encoder.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/screenrecorder/omx_encoder.cc b/selfdrive/ui/qt/screenrecorder/omx_encoder.cc index a020d44afe..3a9e702e40 100644 --- a/selfdrive/ui/qt/screenrecorder/omx_encoder.cc +++ b/selfdrive/ui/qt/screenrecorder/omx_encoder.cc @@ -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