Mercurial > libavcodec.hg
changeset 11810:2ae71694d6ae libavcodec
Make avcodec_string() use av_get_codec_tag_string().
author | stefano |
---|---|
date | Wed, 02 Jun 2010 10:54:50 +0000 |
parents | 867d82f512df |
children | 2501df1cabc5 |
files | utils.c |
diffstat | 1 files changed, 3 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Wed Jun 02 10:54:45 2010 +0000 +++ b/utils.c Wed Jun 02 10:54:50 2010 +0000 @@ -840,17 +840,9 @@ codec_name = enc->codec_name; } else { /* output avi tags */ - 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); - } else { - snprintf(buf1, sizeof(buf1), "0x%04x", enc->codec_tag); - } + char tag_buf[32]; + av_get_codec_tag_string(tag_buf, sizeof(tag_buf), enc->codec_tag); + snprintf(buf1, sizeof(buf1), "%s / 0x%04X", tag_buf, enc->codec_tag); codec_name = buf1; }