summaryrefslogtreecommitdiff
path: root/libavfilter/vf_drawtext.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_drawtext.c')
-rw-r--r--libavfilter/vf_drawtext.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index e8905a40d3..3affa736c7 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -916,6 +916,14 @@ static int func_pts(AVFilterContext *ctx, AVBPrint *bp,
sign = '-';
ms = -ms;
}
+ if (argc >= 3) {
+ if (!strcmp(argv[2], "24HH")) {
+ ms %= 24 * 60 * 60 * 1000;
+ } else {
+ av_log(ctx, AV_LOG_ERROR, "Invalid argument '%s'\n", argv[2]);
+ return AVERROR(EINVAL);
+ }
+ }
av_bprintf(bp, "%c%02d:%02d:%02d.%03d", sign,
(int)(ms / (60 * 60 * 1000)),
(int)(ms / (60 * 1000)) % 60,