[FFmpeg-devel] [PATCH v2] lavfi/drawtext: Add localtime_ms for millisecond precision
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Tue Feb 1 01:10:37 EET 2022
Thilo Borgmann:
> Am 31.01.22 um 14:08 schrieb Nicolas George:
>> Thilo Borgman (12022-01-31):
>>>> v10 attached.
>>>
>>> Also going to apply soon if there are no more comments.
>>
>> I think you neglected to attach the file.
>
> omg stupid me. Here it is...
>
> -Thilo
>
>
> +
> + if (fmt_new && fmt_new != argv[0] && fmt_new != fmt_default)
> + av_freep(&fmt_new);
> +
fmt_new is always NULL at this point, so the above is unnecessary.
>
> + if (fmt && fmt != argv[0] && fmt != fmt_default)
> + av_freep(&fmt);
> +
Don't free a const char*. Instead add char *fmt_new = NULL; directly
besides the definition of fmt and free fmt_new after
av_bprint_strftime(). This fmt_new should obviously be used instead of
the current fmt_new with the more limited scope.
You can then also remove fmt_default.
- Andreas
More information about the ffmpeg-devel
mailing list