[MPlayer-G2-dev] CVS: main/libmpeg2 header.c,1.13,1.14
Ivan Kalvachev CVS
syncmail at mplayerhq.hu
Mon Jun 21 18:03:57 CEST 2004
CVS change done by Ivan Kalvachev CVS
Update of /cvsroot/mplayer/main/libmpeg2
In directory mail:/var2/tmp/cvs-serv11903
Modified Files:
header.c
Log Message:
width and height in seq_header could never be 0
Index: header.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpeg2/header.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- header.c 3 Aug 2003 12:04:57 -0000 1.13
+++ header.c 21 Jun 2004 16:03:55 -0000 1.14
@@ -111,6 +111,10 @@
i = (buffer[0] << 16) | (buffer[1] << 8) | buffer[2];
sequence->display_width = sequence->picture_width = width = i >> 12;
sequence->display_height = sequence->picture_height = height = i & 0xfff;
+
+ if(width == 0 || height == 0)
+ return 1;
+
decoder->width = sequence->width = width = (width + 15) & ~15;
decoder->height = sequence->height = height = (height + 15) & ~15;
decoder->vertical_position_extension = (height > 2800);
More information about the MPlayer-G2-dev
mailing list