diff h263.c @ 241:4bb6289eff93 libavcodec

avoid overflow of picturenumber*fps*10000 bug found by Lennert Buytenhek <buytenh@gnu.org>
author michaelni
date Mon, 18 Feb 2002 01:58:00 +0000
parents 5fc0c3af3fe4
children a023f78e0cc2
line wrap: on
line diff
--- a/h263.c	Mon Feb 18 00:31:16 2002 +0000
+++ b/h263.c	Mon Feb 18 01:58:00 2002 +0000
@@ -68,7 +68,7 @@
     s->gob_number = 0;
 
     put_bits(&s->pb, 22, 0x20); /* PSC */
-    put_bits(&s->pb, 8, ((s->picture_number * 30 * FRAME_RATE_BASE) / 
+    put_bits(&s->pb, 8, (((INT64)s->picture_number * 30 * FRAME_RATE_BASE) / 
                          s->frame_rate) & 0xff);
 
     put_bits(&s->pb, 1, 1);	/* marker */