aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-08 23:48:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-09 00:56:31 +0200
commite051d09c58c6f51fea0ce0dab32fe92f58211ac0 (patch)
tree9f29ea71880e905dfdcc132ca5bda5895069a728 /libavcodec/utils.c
parentf22f873ef013098d61d1e9fc311f5a373fb4f933 (diff)
downloadffmpeg-e051d09c58c6f51fea0ce0dab32fe92f58211ac0.tar.gz
avcodec: Allow choosing the dump format field separator.
The default is to maintain the previous ", " for now. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 69c940b793..d235678779 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2950,6 +2950,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
int bitrate;
int new_line = 0;
AVRational display_aspect_ratio;
+ const char *separator = enc->dump_separator ? enc->dump_separator : ", ";
if (!buf || buf_size <= 0)
return;
@@ -2987,7 +2988,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
char detail[256] = "(";
const char *colorspace_name;
- av_strlcat(buf, "\n ", buf_size);
+ av_strlcat(buf, separator, buf_size);
snprintf(buf + strlen(buf), buf_size - strlen(buf),
"%s", enc->pix_fmt == AV_PIX_FMT_NONE ? "none" :
@@ -3039,7 +3040,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
}
break;
case AVMEDIA_TYPE_AUDIO:
- av_strlcat(buf, "\n ", buf_size);
+ av_strlcat(buf, separator, buf_size);
if (enc->sample_rate) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),
"%d Hz, ", enc->sample_rate);