]> granicus.if.org Git - libvpx/commitdiff
Fix check of debug counts for corrupt frame
authorAdrian Grange <agrange@google.com>
Wed, 7 May 2014 17:31:55 +0000 (10:31 -0700)
committerAdrian Grange <agrange@google.com>
Fri, 9 May 2014 17:12:23 +0000 (10:12 -0700)
Fixes the idecoder in the case where:
  cm->error_resilient_mode == 0, and
  cm->frame_parallel_decoding_mode == 0, but
  new_fb->corrupted == 1.

The assert in debug_check_frame_counts fails to
take into account the case of a corrupt frame.

Change-Id: Idf318a68458cc88d65d6f3f408a10d8ffe87e43f

vp9/decoder/vp9_decodeframe.c

index 45ebb2feded5d6e227ddc104d54621915c501f00..75701c285d500c212dfbd56d1c3ee02e2b6bb887 100644 (file)
@@ -1370,16 +1370,17 @@ int vp9_decode_frame(VP9Decoder *pbi,
                          "A stream must start with a complete key frame");
   }
 
-  if (!cm->error_resilient_mode && !cm->frame_parallel_decoding_mode &&
-      !new_fb->corrupted) {
-    vp9_adapt_coef_probs(cm);
+  if (!new_fb->corrupted) {
+    if (!cm->error_resilient_mode && !cm->frame_parallel_decoding_mode) {
+      vp9_adapt_coef_probs(cm);
 
-    if (!frame_is_intra_only(cm)) {
-      vp9_adapt_mode_probs(cm);
-      vp9_adapt_mv_probs(cm, cm->allow_high_precision_mv);
+      if (!frame_is_intra_only(cm)) {
+        vp9_adapt_mode_probs(cm);
+        vp9_adapt_mv_probs(cm, cm->allow_high_precision_mv);
+      }
+    } else {
+      debug_check_frame_counts(cm);
     }
-  } else {
-    debug_check_frame_counts(cm);
   }
 
   if (cm->refresh_frame_context)