Clean up vp8cx_create/remove_encoder_threads()
authorWan-Teh Chang <wtc@google.com>
Wed, 4 Oct 2023 03:08:18 +0000 (20:08 -0700)
committerWan-Teh Chang <wtc@google.com>
Wed, 4 Oct 2023 03:08:18 +0000 (20:08 -0700)
commitea67878f8c36f96c54947a72f759c955ce69cb80
tree0f31c2b4ce0c8676d0a8d72b7cbd41d4f962b249
parent5b6ceba996f08e2502737eec14f291ac8d46a5bc
Clean up vp8cx_create/remove_encoder_threads()

Make vp8cx_create_encoder_threads() undo everything cleanly before
returning an error.

Make vp8cx_remove_encoder_threads() reset pointer fields to NULL after
freeing them, reset encoding_thread_count to 0, and reset b_lpf_running
to 0 (false). This makes it safe to call vp8cx_create_encoder_threads()
after calling vp8cx_remove_encoder_threads().

Change-Id: I586f06ce3d5b1c88ca46884bb4d6667ffc97e440
vp8/encoder/ethreading.c