Add an assertion to CONFIG_BITSTREAM_DEBUG code This assertion was suggested by James Zern. The code was originally added in https://aomedia-review.googlesource.com/c/aom/+/155441. Change-Id: I45a8a95ea41a9799c79fac2e5314d1d8e597949b
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index df66961..77b036f 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c
@@ -5164,12 +5164,14 @@ MACROBLOCKD *const xd = &pbi->dcb.xd; #if CONFIG_BITSTREAM_DEBUG - if (cm->seq_params->order_hint_info.enable_order_hint) + if (cm->seq_params->order_hint_info.enable_order_hint) { aom_bitstream_queue_set_frame_read(cm->current_frame.order_hint * 2 + cm->show_frame); - else + } else { // This is currently used in RTC encoding. cm->show_frame is always 1. + assert(cm->show_frame); aom_bitstream_queue_set_frame_read(cm->current_frame.frame_number); + } #endif #if CONFIG_MISMATCH_DEBUG mismatch_move_frame_idx_r();