From 9dc7d4fb976d3ab52ee03822170cd484ff316be5 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sat, 24 Nov 2012 08:19:04 -0800 Subject: [PATCH] Fix crash in pick_inter_mode_sb(). It didn't handle rd_thresh == INT_MAX, which means the reference is unavailable. Change-Id: Ie6fa8b2577437411db81a8c24e8dcdfd856a0e8d --- vp9/encoder/rdopt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/rdopt.c b/vp9/encoder/rdopt.c index 5d0b111ce..ea8f8d9a5 100644 --- a/vp9/encoder/rdopt.c +++ b/vp9/encoder/rdopt.c @@ -4632,7 +4632,8 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x, #endif // Test best rd so far against threshold for trying this mode. - if (best_rd <= cpi->rd_threshes[mode_index]) { + if (best_rd <= cpi->rd_threshes[mode_index] || + cpi->rd_threshes[mode_index] == INT_MAX) { continue; } -- 2.40.0