vp8: clear cached resolution on thread restart failure
In vp8_decode(), vp8_peek_si_internal() updates ctx->si.w and ctx->si.h
from the keyframe header before restarting decode threads. If
vp8_decoder_create_threads() or vp8mt_alloc_temp_buffers() fails in the
restart_threads block, the setjmp handler returned VPX_CODEC_ERROR
without clearing ctx->si.w and ctx->si.h.
On subsequent decode calls with a keyframe of the same new dimensions,
resolution_change stayed 0 and frame buffer reallocation was skipped
while temporary multithread row buffers were allocated for the new
width, causing a heap-buffer-overflow in vp8mt_decode_mb_rows().
Clear ctx->si.w and ctx->si.h in the restart_threads error handler so a
full reallocation is triggered on resync.
Added unittest.
Bug: 571147583
Change-Id: Ic16476a531796751017182a1ef726756353f49d1
2 files changed