mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-10-01 03:43:51 +08:00
Revert "OMXEncoder: add calls to OMX_Init()&OMX_Deinit() (#19905)"
This reverts commit 8f00813089.
This commit is contained in:
@@ -184,7 +184,6 @@ OmxEncoder::OmxEncoder(const char* filename, int width, int height, int fps, int
|
|||||||
this->v_ptr2 = (uint8_t *)malloc(this->width*this->height/4);
|
this->v_ptr2 = (uint8_t *)malloc(this->width*this->height/4);
|
||||||
}
|
}
|
||||||
|
|
||||||
OMX_CHECK(OMX_Init());
|
|
||||||
auto component = (OMX_STRING)(h265 ? "OMX.qcom.video.encoder.hevc" : "OMX.qcom.video.encoder.avc");
|
auto component = (OMX_STRING)(h265 ? "OMX.qcom.video.encoder.hevc" : "OMX.qcom.video.encoder.avc");
|
||||||
int err = OMX_GetHandle(&this->handle, component, this, &omx_callbacks);
|
int err = OMX_GetHandle(&this->handle, component, this, &omx_callbacks);
|
||||||
if (err != OMX_ErrorNone) {
|
if (err != OMX_ErrorNone) {
|
||||||
@@ -604,7 +603,6 @@ OmxEncoder::~OmxEncoder() {
|
|||||||
wait_for_state(OMX_StateLoaded);
|
wait_for_state(OMX_StateLoaded);
|
||||||
|
|
||||||
OMX_CHECK(OMX_FreeHandle(this->handle));
|
OMX_CHECK(OMX_FreeHandle(this->handle));
|
||||||
OMX_CHECK(OMX_Deinit());
|
|
||||||
|
|
||||||
while (queue_try_pop(&this->free_in));
|
while (queue_try_pop(&this->free_in));
|
||||||
while (queue_try_pop(&this->done_out));
|
while (queue_try_pop(&this->done_out));
|
||||||
|
|||||||
Reference in New Issue
Block a user