[MPlayer-cvslog] CVS: main/libmpdemux mpeg_hdr.c,1.10,1.11

Nico Sabbi CVS syncmail at mplayerhq.hu
Sat Apr 9 13:00:03 CEST 2005


CVS change done by Nico Sabbi CVS

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

Modified Files:
	mpeg_hdr.c 
Log Message:
assign picture->(width,height) when parsing h264

Index: mpeg_hdr.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/mpeg_hdr.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- mpeg_hdr.c	20 Mar 2005 14:16:21 -0000	1.10
+++ mpeg_hdr.c	9 Apr 2005 11:00:00 -0000	1.11
@@ -297,8 +297,9 @@
 
 int h264_parse_sps(mp_mpeg_header_t * picture, unsigned char * buf, int len)
 {
-  unsigned int n = 0, m = 0, v, i, j;
+  unsigned int n = 0, v, i, j, mbh;
   unsigned char *dest;
+  int frame_mbs_only;
 
   dest = (unsigned char*) malloc(len);
   if(! dest)
@@ -343,9 +344,11 @@
   }
   read_golomb(buf, &n);
   getbits(buf, n++, 1);
-  read_golomb(buf, &n);
-  read_golomb(buf, &n);
-  if(!getbits(buf, n++, 1))
+  picture->display_picture_width = 16 *(read_golomb(buf, &n)+1);
+  mbh = read_golomb(buf, &n)+1;
+  frame_mbs_only = getbits(buf, n++, 1);
+  picture->display_picture_height = 16 * (2 - frame_mbs_only) * mbh;
+  if(!frame_mbs_only)
     getbits(buf, n++, 1);
   getbits(buf, n++, 1);
   if(getbits(buf, n++, 1))




More information about the MPlayer-cvslog mailing list