dump_metadata: Fix 0xd in metadata

Fixed ticket245

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 14 years ago
parent 867b10679c
commit 4aeb776913
  1. 9
      libavformat/utils.c

@ -3329,8 +3329,13 @@ static void dump_metadata(void *ctx, AVDictionary *m, const char *indent)
av_log(ctx, AV_LOG_INFO, "%sMetadata:\n", indent);
while((tag=av_dict_get(m, "", tag, AV_DICT_IGNORE_SUFFIX))) {
if(strcmp("language", tag->key))
av_log(ctx, AV_LOG_INFO, "%s %-16s: %s\n", indent, tag->key, tag->value);
if(strcmp("language", tag->key)){
char tmp[256];
int i;
av_strlcpy(tmp, tag->value, sizeof(tmp));
for(i=0; i<strlen(tmp); i++) if(tmp[i]==0xd) tmp[i]=' ';
av_log(ctx, AV_LOG_INFO, "%s %-16s: %s\n", indent, tag->key, tmp);
}
}
}
}

Loading…
Cancel
Save