changeset 10484:105077598ef3

dump extra bytes of bitmapinfoheader in verbose mode and make outputs consistent
author alex
date Sun, 27 Jul 2003 22:15:08 +0000
parents f7969fbc9458
children c09a68c1b949
files libmpdemux/aviprint.c
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aviprint.c	Sun Jul 27 21:55:54 2003 +0000
+++ b/libmpdemux/aviprint.c	Sun Jul 27 22:15:08 2003 +0000
@@ -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");
 }