[FFmpeg-devel] [PATCH 01/12] avutil/parseutils: use microsecond precision when parsing "now" in av_parse_time()

Marton Balint cus at passwd.hu
Wed Feb 10 20:37:19 CET 2016


On Sun, 7 Feb 2016, Marton Balint wrote:

>
> On Sun, 7 Feb 2016, Michael Niedermayer wrote:
>
>> On Sat, Feb 06, 2016 at 08:13:12PM +0100, Marton Balint wrote:
>>> Use av_gettime() instead of time(0) for querying current time.
>>>
>>> Signed-off-by: Marton Balint <cus at passwd.hu>
>>> ---
>>>  libavutil/parseutils.c    | 12 +++++++-----
>>>  tests/ref/fate/parseutils |  4 ++--
>>>  2 files changed, 9 insertions(+), 7 deletions(-)
>>
>> after this (whole) patchset
>> ./ffmpeg  -i lena.pnm -timestamp "2016-01-01 01:01:01" test.mp4
>> exiftool test.mp4
>> results in
>> Create Date                     : 1904:01:01 00:00:00
>> Modify Date                     : 1904:01:01 00:00:00
>>
>
> Hmm, apparently I missed the fact iso 8601 time specs can have timezone 
> specifiers as well, even if they were not parsed but silently ignored by 
> the existing function.
>
> I will rework the second patch to fix that.

Anybody against this series? With the issues fixed pointed out by Michael, 
I believe it is pretty safe to apply, the one patch which may need 
consideration is the last one patching ffmpeg_opt.c and removing hardcoded 
"now" support in creation_time metadata because it may cause writing the 
actual string "now" as creation time for formats which do not parse 
creation_time metadata but write all metadata to the output blindly as a 
string.

Regards,
Marton


More information about the ffmpeg-devel mailing list