[Mplayer-cvslog] CVS: main/libmpdemux aviprint.c,1.16,1.17

Alex Beregszaszi alex at mplayerhq.hu
Mon Jul 28 00:15:30 CEST 2003


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv7630

Modified Files:
	aviprint.c 
Log Message:
dump extra bytes of bitmapinfoheader in verbose mode and make outputs consistent

Index: aviprint.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/aviprint.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- aviprint.c	6 Nov 2002 23:54:26 -0000	1.16
+++ aviprint.c	27 Jul 2003 22:15:08 -0000	1.17
@@ -37,10 +37,11 @@
   printf("streams: %ld\n",h->dwStreams);
   printf("Suggested BufferSize: %ld\n",h->dwSuggestedBufferSize);
   printf("Size:  %ld x %ld\n",h->dwWidth,h->dwHeight);
+  printf("==========================\n");
 }
 
 void print_strh(AVIStreamHeader *h){
-  printf("======= STREAM Header =======\n");
+  printf("====== STREAM Header =====\n");
   printf("Type: %.4s   FCC: %.4s (%X)\n",(char *)&h->fccType,(char *)&h->fccHandler,(unsigned int)h->fccHandler);
   printf("Flags: %ld\n",h->dwFlags);
   printf("Priority: %d   Language: %d\n",h->wPriority,h->wLanguage);
@@ -50,6 +51,7 @@
   printf("Suggested BufferSize: %ld\n",h->dwSuggestedBufferSize);
   printf("Quality %ld\n",h->dwQuality);
   printf("Sample size: %ld\n",h->dwSampleSize);
+  printf("==========================\n");
 }
 
 void print_wave_header(WAVEFORMATEX *h){
@@ -78,6 +80,7 @@
 	printf("[%x] ", *(p+i));
     printf("\n");
   }
+  printf("===========================\n");
 }
 
 
@@ -90,6 +93,15 @@
 	printf("  biBitCount %d\n", h->biBitCount);
 	printf("  biCompression %d='%.4s'\n", h->biCompression, (char *)&h->biCompression);
 	printf("  biSizeImage %d\n", h->biSizeImage);
+  if (h->biSize > sizeof(BITMAPINFOHEADER))
+  {
+    int i;
+    uint8_t* p = ((uint8_t*)h) + sizeof(BITMAPINFOHEADER);
+    printf("Unknown extra header dump: ");
+    for (i = 0; i < h->biSize-sizeof(BITMAPINFOHEADER); i++)
+	printf("[%x] ", *(p+i));
+    printf("\n");
+  }
   printf("===========================\n");
 }
 



More information about the MPlayer-cvslog mailing list