Commit bdfb4a6f authored by Rupert Swarbrick's avatar Rupert Swarbrick

Report a proper error when bitstream wrongly requests prev_frame_mvs

Using an assert (which was compiled out) meant we got to a
use-after-free in bug 729.

BUG=aomedia:729

Change-Id: I4d0fa5e80322c395f94565c76e2285782c328505
parent 0f248c46
......@@ -5243,7 +5243,10 @@ void av1_decode_frame(AV1Decoder *pbi, const uint8_t *data,
#endif // CONFIG_EXT_REFS || CONFIG_TEMPMV_SIGNALING
#if CONFIG_TEMPMV_SIGNALING
if (cm->use_prev_frame_mvs) assert(frame_can_use_prev_frame_mvs(cm));
if (cm->use_prev_frame_mvs && !frame_can_use_prev_frame_mvs(cm)) {
aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Frame wrongly requests previous frame MVs");
}
#else
cm->use_prev_frame_mvs = !cm->error_resilient_mode && cm->prev_frame &&
#if CONFIG_FRAME_SUPERRES
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment