aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-13 20:04:26 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-18 18:03:19 +0200
commitc2e17e8d8446abbd5dcfebab1e63024837677ca7 (patch)
tree22f1cb04b01237704d8410726f2882b8a4a4bfc8 /libavformat
parent84340497c03d34ce6902d210b8a20b848c37ce98 (diff)
downloadffmpeg-c2e17e8d8446abbd5dcfebab1e63024837677ca7.tar.gz
avformat/au: Simplify writing string into AVBPrint
by using av_bprintf() instead of several av_bprint_append(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/au.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/au.c b/libavformat/au.c
index c4a32ff76c..a8906a9db7 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -262,13 +262,11 @@ static int au_get_annotations(AVFormatContext *s, char **buffer)
if (t != NULL) {
if (cnt++)
av_bprint_chars(&bprint, '\n', 1);
- av_bprint_append_data(&bprint, keys[i], strlen(keys[i]));
- av_bprint_chars(&bprint, '=', 1);
- av_bprint_append_data(&bprint, t->value, strlen(t->value));
+ av_bprintf(&bprint, "%s=%s", keys[i], t->value);
}
}
/* pad with 0's */
- av_bprint_append_data(&bprint, "\0\0\0\0\0\0\0\0", 8);
+ av_bprint_chars(&bprint, '\0', 8);
return av_bprint_finalize(&bprint, buffer);
}