[MPlayer-cvslog] CVS: main/libmpdemux mpeg_hdr.c, 1.11, 1.12 mpeg_hdr.h, 1.4, 1.5

Loren Merritt CVS syncmail at mplayerhq.hu
Tue Apr 19 23:17:42 CEST 2005


CVS change done by Loren Merritt CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv6110

Modified Files:
	mpeg_hdr.c mpeg_hdr.h 
Log Message:
integer overflow when reading fps from h264 vui.


Index: mpeg_hdr.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/mpeg_hdr.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- mpeg_hdr.c	9 Apr 2005 11:00:00 -0000	1.11
+++ mpeg_hdr.c	19 Apr 2005 21:17:39 -0000	1.12
@@ -286,7 +286,7 @@
     fixed_fps = getbits(buf, n, 1);
     
     if(picture->timeinc_unit > 0 && picture->timeinc_resolution > 0)
-      picture->fps = (picture->timeinc_resolution * 10000) / picture->timeinc_unit;
+      picture->fps = ((uint64_t)picture->timeinc_resolution * 10000) / picture->timeinc_unit;
   }
   
   //fprintf(stderr, "H264_PARSE_VUI, OVESCAN=%u, VSP_COLOR=%u, CHROMA=%u, TIMING=%u, DISPW=%u, DISPH=%u, TIMERES=%u, TIMEINC=%u, FIXED_FPS=%u\n", overscan, vsp_color, chroma, timing, picture->display_picture_width, picture->display_picture_height,

Index: mpeg_hdr.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/mpeg_hdr.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mpeg_hdr.h	1 Mar 2005 23:45:32 -0000	1.4
+++ mpeg_hdr.h	19 Apr 2005 21:17:39 -0000	1.5
@@ -16,7 +16,7 @@
     int top_field_first;
     int display_time; // secs*100
     //the following are for mpeg4
-    int timeinc_resolution, timeinc_bits, timeinc_unit;
+    unsigned int timeinc_resolution, timeinc_bits, timeinc_unit;
     int picture_type;
 } mp_mpeg_header_t;
 




More information about the MPlayer-cvslog mailing list