h264: set ref_count to 0 for intra slices.
authorAnton Khirnov <anton@khirnov.net>
Thu, 14 Feb 2013 10:44:33 +0000 (11:44 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sat, 2 Mar 2013 09:27:13 +0000 (10:27 +0100)
CC:libav-stable@libav.org

libavcodec/h264.c

index 7d24df2..e7186c8 100644 (file)
@@ -3384,8 +3384,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
             h->list_count = 2;
         else
             h->list_count = 1;
-    } else
+    } else {
         h->list_count = 0;
+        h->ref_count[0] = h->ref_count[1] = 0;
+    }
+
 
     max_refs = h->picture_structure == PICT_FRAME ? 16 : 32;