changeset 23750:a9bf0730f6b2

Print the number of the Unknow color format, so verbose debug output could be a little more useful.
author iive
date Wed, 11 Jul 2007 21:30:16 +0000
parents f7b424ecf3f9
children cc06b5e849bb
files libmpcodecs/img_format.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/img_format.c	Wed Jul 11 19:47:20 2007 +0000
+++ b/libmpcodecs/img_format.c	Wed Jul 11 21:30:16 2007 +0000
@@ -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 @@
 	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;
 }