[FFmpeg-devel] [PATCH] avformat/mov: remove hack breaking creation time parsing

Anton Khirnov anton at khirnov.net
Sun Apr 9 17:06:40 EEST 2023


Quoting Marton Balint (2023-04-09 15:49:33)
> 
> 
> On Sat, 8 Apr 2023, Michael Niedermayer wrote:
> 
> > On Sat, Apr 08, 2023 at 08:37:24PM +0200, Marton Balint wrote:
> >> Commit 23eeffcd48a15e73fb2649b712870b6d101c5471 added a hack to support invalid
> >> files where the creation date was encoded as a classic unix timestamp. This
> >> broke however valid files having creation dates before the unix epoch.
> >>
> >> Signed-off-by: Marton Balint <cus at passwd.hu>
> >> ---
> >>  libavformat/mov.c | 3 +--
> >>  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > This results in:
> > @@ -1,11 +1,11 @@
> > -    creation_time   : 2012-06-20T20:58:31.000000Z
> > -      creation_time   : 2012-06-20T20:58:31.000000Z
> > -      creation_time   : 2012-06-20T20:58:31.000000Z
> > +    creation_time   : 1946-06-20T20:58:31.000000Z
> > +      creation_time   : 1946-06-20T20:58:31.000000Z
> > +      creation_time   : 1946-06-20T20:58:31.000000Z
> >
> > Are you sure that 1946 is the correct creation date and not 2012 ?
> 
> If you are referring to the file in ticket #1471, yes, 1946 is consistent 
> with what mediainfo shows for creation time. Obviously 1946 was not the 
> intended creation time, but that does not warrant us to break 
> files where 1946 is the *intended* creation time. Proper way to fix the 
> original issue would be to detect the device and software version which 
> produces the invalid files, and only apply the hack there. But I don't 
> think that is doable here, the file does not seem to contain any device or 
> software information.

How about adding an option for it, like -unix_time?

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list