h264: fix variable overflow after a few years of video playback
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 20 Aug 2012 20:30:00 +0000 (22:30 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 20 Aug 2012 20:30:00 +0000 (22:30 +0200)
Found-by: Joakim Plate <elupus@ecce.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c

index 5d9758b..f94e1e1 100644 (file)
@@ -3868,7 +3868,7 @@ again:
                     break;
 
                 if (h->sei_recovery_frame_cnt >= 0 && (h->frame_num != h->sei_recovery_frame_cnt || hx->slice_type_nos != AV_PICTURE_TYPE_I))
-                    h->valid_recovery_point++;
+                    h->valid_recovery_point = 1;
 
                 if (   h->sei_recovery_frame_cnt >= 0
                     && (   h->recovery_frame<0