[FFmpeg-devel] [PATCH] libavfilter/vf_drawtext.c:add support to generte ms level
Michael Niedermayer
michael at niedermayer.cc
Thu May 28 23:06:19 EEST 2020
On Thu, May 28, 2020 at 04:31:58PM +0800, 黄思远 wrote:
> ea327ff8f5deb8958062cf9dc0d5c4acbb47111d 0001-libavfilter-vf_drawtext.c-add-support-to-generte-ms-.patch
> From 94cf5f13eaf565ea230ca3628119029caf07d2c5 Mon Sep 17 00:00:00 2001
> From: SiyuanHuang <saber.huang at samsung.com>
> Date: Thu, 28 May 2020 13:42:01 +0800
> Subject: [PATCH] libavfilter/vf_drawtext.c:add support to generte ms level
> timestamp
>
> for test latency , need sub-seconds level timestamp watermark
>
> Signed-off-by: SiyuanHuang <saber.huang at samsung.com>
> ---
> libavfilter/vf_drawtext.c | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
> mode change 100644 => 100755 libavfilter/vf_drawtext.c
>
> diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> old mode 100644
> new mode 100755
> index abe1ca6c35..734556eef3
> --- a/libavfilter/vf_drawtext.c
> +++ b/libavfilter/vf_drawtext.c
> @@ -61,6 +61,8 @@
> #include "internal.h"
> #include "video.h"
>
> +#include <sys/timeb.h>
> +#include <time.h>
> #if CONFIG_LIBFRIBIDI
> #include <fribidi.h>
> #endif
> @@ -1322,8 +1324,21 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame,
> return ret;
> break;
> case EXP_STRFTIME:
> - localtime_r(&now, <ime);
> - av_bprint_strftime(bp, s->text, <ime);
> + if (!= av_stristr(s->text, "mspts")) {
Please test your code before submitting, this will not build
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200528/875d2caa/attachment.sig>
More information about the ffmpeg-devel
mailing list