[MPlayer-cvslog] r23770 - trunk/libmpcodecs/img_format.c

iive subversion at mplayerhq.hu
Wed Jul 11 23:30:16 CEST 2007


Author: iive
Date: Wed Jul 11 23:30:16 2007
New Revision: 23770

Log:
Print the number of the Unknow color format,
so verbose debug output could be a little more useful.


Modified:
   trunk/libmpcodecs/img_format.c

Modified: trunk/libmpcodecs/img_format.c
==============================================================================
--- trunk/libmpcodecs/img_format.c	(original)
+++ trunk/libmpcodecs/img_format.c	Wed Jul 11 23:30:16 2007
@@ -1,8 +1,10 @@
 #include "config.h"
 #include "img_format.h"
+#include "stdio.h"
 
 const char *vo_format_name(int format)
 {
+    static char unknow_format[20];
     switch(format)
     {
 	case IMGFMT_RGB1: return("RGB 1-bit");
@@ -66,5 +68,6 @@ const char *vo_format_name(int format)
 	case IMGFMT_XVMC_MOCO_MPEG2: return("MPEG1/2 Motion Compensation");
 	case IMGFMT_XVMC_IDCT_MPEG2: return("MPEG1/2 Motion Compensation and IDCT");
     }
-    return("Unknown");
+    snprintf(unknow_format,20,"Unknown 0x%04x",format);
+    return unknow_format;
 }



More information about the MPlayer-cvslog mailing list