From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] avformat/mov: remove hack breaking creation time parsing Date: Sun, 9 Apr 2023 23:27:48 +0200 Message-ID: <20230409212748.GF1164690@pb2> (raw) In-Reply-To: <da5a9f3b-aa8-4d55-3bd4-bed53aade9fa@passwd.hu> [-- Attachment #1.1: Type: text/plain, Size: 3105 bytes --] On Sun, Apr 09, 2023 at 07:52:12PM +0200, Marton Balint wrote: > > > On Sun, 9 Apr 2023, Michael Niedermayer wrote: > > > On Sun, Apr 09, 2023 at 03:49:33PM +0200, Marton Balint wrote: > > > > > > > > > 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@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. > > > > what do you mean by intended creation time? > > the file format did not exist in 1946. and all the codecs also didnt exist > > so when you encounter a file that says its from that time it must be crafted > > later and backdated or that bug. > > we know the bug is a real thing > > do you want to support crafted and backdatred files? if so can you explain > > the usecase for that ? > > http://ffmpeg.org/pipermail/ffmpeg-user/2023-April/056265.html > > Alternatives I can think of: > > 1) A -unix_time switch what Anton proposed > 2) doing strict compliant parsing only if mdat version is 1 so creation time > is 64bit. And change our muxer to write mdat version 1 by default, so ffmpeg > will be able to read back what it has written... What do we know about the buggy files that need this correction ? Is there any hint/metadata that identifies the muxer/encoder/version ? Limiting the correction to the cases that need it is a good idea Iam not sure i feel positive about changing the muxer thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In a rich man's house there is no place to spit but his face. -- Diogenes of Sinope [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-04-09 21:27 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-08 18:37 Marton Balint 2023-04-08 21:14 ` Michael Niedermayer 2023-04-09 13:49 ` Marton Balint 2023-04-09 14:06 ` Anton Khirnov 2023-04-09 17:20 ` Michael Niedermayer 2023-04-09 17:52 ` Marton Balint 2023-04-09 21:27 ` Michael Niedermayer [this message] 2023-04-10 19:11 ` Marton Balint 2023-04-10 22:34 ` Michael Niedermayer 2023-04-10 2:44 ` "zhilizhao(赵志立)" 2023-04-10 14:31 ` Michael Niedermayer 2023-04-11 11:46 Bernd Dürrer 2023-04-11 18:15 ` Marton Balint 2023-04-12 8:10 ` Bernd Dürrer 2023-04-12 8:38 ` "zhilizhao(赵志立)" 2023-04-13 10:13 ` Bernd Dürrer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230409212748.GF1164690@pb2 \ --to=michael@niedermayer.cc \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git