summaryrefslogtreecommitdiff
path: root/ffprobe.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-06-02 10:54:45 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-06-02 10:54:45 +0000
commit7e566bbe6ce367e880bf09e293a9e72e52c0988e (patch)
tree3988b406e82bcf143d409bd5b3aa551dbcd1bdc3 /ffprobe.c
parent3b963552bc8bd740c8c782778b5b1a427f268cd0 (diff)
downloadffmpeg-7e566bbe6ce367e880bf09e293a9e72e52c0988e.tar.gz
Implement av_get_codec_tag_string() and use it in ffprobe.
Originally committed as revision 23421 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/ffprobe.c b/ffprobe.c
index 7cb6167b05..4be5d0f875 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -120,7 +120,6 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
AVCodec *dec;
char val_str[128];
AVMetadataTag *tag = NULL;
- char a, b, c, d;
AVRational display_aspect_ratio;
printf("[STREAM]\n");
@@ -139,16 +138,9 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den);
/* print AVI/FourCC tag */
- a = dec_ctx->codec_tag & 0xff;
- b = dec_ctx->codec_tag>>8 & 0xff;
- c = dec_ctx->codec_tag>>16 & 0xff;
- d = dec_ctx->codec_tag>>24 & 0xff;
- printf("codec_tag_string=");
- if (isprint(a)) printf("%c", a); else printf("[%d]", a);
- if (isprint(b)) printf("%c", b); else printf("[%d]", b);
- if (isprint(c)) printf("%c", c); else printf("[%d]", c);
- if (isprint(d)) printf("%c", d); else printf("[%d]", d);
- printf("\ncodec_tag=0x%04x\n", dec_ctx->codec_tag);
+ av_get_codec_tag_string(val_str, sizeof(val_str), dec_ctx->codec_tag);
+ printf("codec_tag_string=%s\n", val_str);
+ printf("codec_tag=0x%04x\n", dec_ctx->codec_tag);
switch (dec_ctx->codec_type) {
case AVMEDIA_TYPE_VIDEO: