Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1c3ded39 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Fixes for YuvToJpegEncoder::encode

Bug: 70969260
Test: Existing CTS tests

Call jpeg_destroy_compress after compression (and failure), eliminating
a memory leak.

In addition, use a custom method for handling errors. skjpeg_error_exit
was previously used, but that method expects a skjpeg_error_mgr, which
isn't used here. skjpeg_error_mgr is more complex than necessary; it
allows for multiple methods to set their own jmp_bufs, even if they call
each other. The entire compression here is contained in one method. The
code for handling this single jmp_buf is simple, so no need to share
code.

This is a follow-on to If9a33ed10ea60131906a632a7030e0b69a21f4ea, which
removed skjpeg_error_mgr, but incorrectly left the skjpeg_error_exit.

Change-Id: Ib76e07ae0d29b093d3709f60e427b18e0e32bd9d
parent 04fe7e60
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment