Le nonidi 19 vendémiaire, an CCXXV, Patrick Fischer a écrit :
> What do you think, will this be a good enhancement??

Have you tried use_wallclock_as_timestamps?

> --- FFmpeg-release-3.0_orig/libavfilter/vf_drawtext.c   2016-09-05
> 02:13:28.000000000 +0200
> +++ FFmpeg-release-3.0/libavfilter/vf_drawtext.c 2016-09-22
> 10:22:55.625648763 +0200

Please use git format-patch or git send-email for patches, and beware bogus
MUAs that rewrap lines they should not.

> @@ -791,6 +791,7 @@
>      return 0;
>  }
>  

> +static int64_t delta = 0;

Static variables are not acceptable in libraries.

>  static int func_pts(AVFilterContext *ctx, AVBPrint *bp,
>                      char *fct, unsigned argc, char **argv, int tag)
>  {
> @@ -801,10 +802,13 @@
>  
>      fmt = argc >= 1 ? argv[0] : "flt";
>      if (argc >= 2) {
> -        int64_t delta;
> -        if ((ret = av_parse_time(&delta, argv[1], 1)) < 0) {
> -            av_log(ctx, AV_LOG_ERROR, "Invalid delta '%s'\n", argv[1]);
> -            return ret;
> +        if (0 == delta) {
> +            if (!strcmp(argv[1], "now")) {
> +                delta = time(NULL)*1000000;
> +            } else if ((ret = av_parse_time(&delta, argv[1], 1)) < 0) {
> +                av_log(ctx, AV_LOG_ERROR, "Invalid delta '%s'\n", argv[1]);
> +                return ret;
> +            }
>          }
>          pts += (double)delta / AV_TIME_BASE;
>      }

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to