diff options
author | Tobias Rapp <t.rapp@noa-archive.com> | 2016-04-07 10:20:53 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-04-13 08:39:07 +0200 |
commit | ee104580c5b83e0fe697a66c2638b56d584c0081 (patch) | |
tree | e8baadc61834aa74d745e20bfc0d37ed6466b982 /libavfilter | |
parent | 3674a53d171028c5bb1692dd80a3cd113bd7ff8b (diff) | |
download | ffmpeg-streaming-ee104580c5b83e0fe697a66c2638b56d584c0081.zip ffmpeg-streaming-ee104580c5b83e0fe697a66c2638b56d584c0081.tar.gz |
avfilter/vf_drawtext: add optional default value to metadata function
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/version.h | 2 | ||||
-rw-r--r-- | libavfilter/vf_drawtext.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/version.h b/libavfilter/version.h index 0dbb7e5..4cb5a2e 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #define LIBAVFILTER_VERSION_MAJOR 6 #define LIBAVFILTER_VERSION_MINOR 41 -#define LIBAVFILTER_VERSION_MICRO 100 +#define LIBAVFILTER_VERSION_MICRO 101 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 1ef3ecb..6b9af5b 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -860,6 +860,8 @@ static int func_metadata(AVFilterContext *ctx, AVBPrint *bp, if (e && e->value) av_bprintf(bp, "%s", e->value); + else if (argc >= 2) + av_bprintf(bp, "%s", argv[1]); return 0; } @@ -975,7 +977,7 @@ static const struct drawtext_function { { "localtime", 0, 1, 'L', func_strftime }, { "frame_num", 0, 0, 0, func_frame_num }, { "n", 0, 0, 0, func_frame_num }, - { "metadata", 1, 1, 0, func_metadata }, + { "metadata", 1, 2, 0, func_metadata }, }; static int eval_function(AVFilterContext *ctx, AVBPrint *bp, char *fct, |