comparison utils.c @ 5460:8919f5110dbf libavformat

Make sure the Metadata: header is not printed if the only metadata will not be displayed. (idea from ffmbc)
author michael
date Sun, 13 Dec 2009 23:39:20 +0000
parents 83b4309c8516
children 68c900a2d203
comparison
equal deleted inserted replaced
5459:83b4309c8516 5460:8919f5110dbf
2852 else av_log(NULL, AV_LOG_INFO, ", %1.0fk %s", d/1000, postfix); 2852 else av_log(NULL, AV_LOG_INFO, ", %1.0fk %s", d/1000, postfix);
2853 } 2853 }
2854 2854
2855 static void dump_metadata(void *ctx, AVMetadata *m, const char *indent) 2855 static void dump_metadata(void *ctx, AVMetadata *m, const char *indent)
2856 { 2856 {
2857 if(m){ 2857 if(m && !(m->count == 1 && av_metadata_get(m, "language", NULL, 0))){
2858 AVMetadataTag *tag=NULL; 2858 AVMetadataTag *tag=NULL;
2859 2859
2860 av_log(ctx, AV_LOG_INFO, "%sMetadata:\n", indent); 2860 av_log(ctx, AV_LOG_INFO, "%sMetadata:\n", indent);
2861 while((tag=av_metadata_get(m, "", tag, AV_METADATA_IGNORE_SUFFIX))) { 2861 while((tag=av_metadata_get(m, "", tag, AV_METADATA_IGNORE_SUFFIX))) {
2862 if(strcmp("language", tag->key)) 2862 if(strcmp("language", tag->key))