h264: reset last_pocs on IDRs
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 16 Nov 2011 22:57:17 +0000 (23:57 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 16 Nov 2011 22:57:17 +0000 (23:57 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c

index 3ec8b85..e62574f 100644 (file)
@@ -2371,11 +2371,14 @@ static void implicit_weight_table(H264Context *h, int field){
  * instantaneous decoder refresh.
  */
 static void idr(H264Context *h){
+    int i;
     ff_h264_remove_all_refs(h);
     h->prev_frame_num= 0;
     h->prev_frame_num_offset= 0;
     h->prev_poc_msb=
     h->prev_poc_lsb= 0;
+    for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++)
+        h->last_pocs[i] = INT_MIN;
 }
 
 /* forget old pics after a seek */