> On Dec 10, 2021, at 3:11 AM, Thilo Borgmann <thilo.borgm...@mail.de> wrote:
> 
> Hi,
> 
> add %{localtime_ms}, %{gmtime_ms} functions to the drawtext filter. Same as 
> %{localtime}/%{gmtime} but with additional millisecond part.
> 
> sorry for delay, second version including review remarks:
> 
> -get timing once
> -also add gmtime_ms instead of just localtime_ms
> 

> +    if (tag == 'M' || tag == 'm') {
> +        char ms[5] = {0};
> +        int64_t dnow = (unow - ((int64_t)now) * 1000000) / 1000;
> +        snprintf(ms, 5, ".%03d", (int)dnow);
> +        av_bprint_append_data(bp, ms, 4);
> +    }
> 


How about

    av_bprintf(&bp, ".%03d", (int)(unow % 1000000) / 1000);

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

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to