aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-19 20:32:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-20 01:58:18 +0200
commit4aeb7769136ae60586d88d17fcce05be9669e72a (patch)
treea1149f3dd1a6ace5b673f39954c2df14a25cb82e /libavformat
parent867b10679c0ea761ce423c104d8b1b8792d92fb9 (diff)
downloadffmpeg-4aeb7769136ae60586d88d17fcce05be9669e72a.tar.gz
dump_metadata: Fix 0xd in metadata
Fixed ticket245 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4fc74fa605..cd90480be6 100644
--- a/libavformat/utils.c
+++ b/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);
+ }
}
}
}