comparison utils.c @ 2856:9211043e0784 libavcodec

print fourcc in a readable form if possible
author michael
date Sat, 03 Sep 2005 20:36:24 +0000
parents 6f7428adc6ad
children f4aea2c316cc
comparison
equal deleted inserted replaced
2855:da95623de901 2856:9211043e0784
765 codec_name = "mpeg2ts"; 765 codec_name = "mpeg2ts";
766 } else if (enc->codec_name[0] != '\0') { 766 } else if (enc->codec_name[0] != '\0') {
767 codec_name = enc->codec_name; 767 codec_name = enc->codec_name;
768 } else { 768 } else {
769 /* output avi tags */ 769 /* output avi tags */
770 if (enc->codec_type == CODEC_TYPE_VIDEO) { 770 if( isprint(enc->codec_tag&0xFF) && isprint((enc->codec_tag>>8)&0xFF)
771 snprintf(buf1, sizeof(buf1), "%c%c%c%c", 771 && isprint((enc->codec_tag>>16)&0xFF) && isprint((enc->codec_tag>>24)&0xFF)){
772 snprintf(buf1, sizeof(buf1), "%c%c%c%c / 0x%04X",
772 enc->codec_tag & 0xff, 773 enc->codec_tag & 0xff,
773 (enc->codec_tag >> 8) & 0xff, 774 (enc->codec_tag >> 8) & 0xff,
774 (enc->codec_tag >> 16) & 0xff, 775 (enc->codec_tag >> 16) & 0xff,
775 (enc->codec_tag >> 24) & 0xff); 776 (enc->codec_tag >> 24) & 0xff,
777 enc->codec_tag);
776 } else { 778 } else {
777 snprintf(buf1, sizeof(buf1), "0x%04x", enc->codec_tag); 779 snprintf(buf1, sizeof(buf1), "0x%04x", enc->codec_tag);
778 } 780 }
779 codec_name = buf1; 781 codec_name = buf1;
780 } 782 }