[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec utils.c,1.149,1.150

Michael Niedermayer CVS michael
Sat Sep 3 22:36:26 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv15504

Modified Files:
	utils.c 
Log Message:
print fourcc in a readable form if possible


Index: utils.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/utils.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- utils.c	2 Sep 2005 19:16:48 -0000	1.149
+++ utils.c	3 Sep 2005 20:36:24 -0000	1.150
@@ -767,12 +767,14 @@
         codec_name = enc->codec_name;
     } else {
         /* output avi tags */
-        if (enc->codec_type == CODEC_TYPE_VIDEO) {
-            snprintf(buf1, sizeof(buf1), "%c%c%c%c", 
+        if(   isprint(enc->codec_tag&0xFF) && isprint((enc->codec_tag>>8)&0xFF) 
+           && isprint((enc->codec_tag>>16)&0xFF) && isprint((enc->codec_tag>>24)&0xFF)){
+            snprintf(buf1, sizeof(buf1), "%c%c%c%c / 0x%04X", 
                      enc->codec_tag & 0xff,
                      (enc->codec_tag >> 8) & 0xff,
                      (enc->codec_tag >> 16) & 0xff,
-                     (enc->codec_tag >> 24) & 0xff);
+                     (enc->codec_tag >> 24) & 0xff,
+                      enc->codec_tag);
         } else {
             snprintf(buf1, sizeof(buf1), "0x%04x", enc->codec_tag);
         }





More information about the ffmpeg-cvslog mailing list