Commit graph

12 commits

Author SHA1 Message Date
arch1t3cht
66c90b7ed8 vfr: Ensure nonzero denominator 2023-01-30 01:56:52 +01:00
arch1t3cht
245cc68afa Fix FrameAtTime computation for CFR
The new formula is just the inverse function of the CFR part of
the TimeAtFrame function.

To see how the previous implementation was faulty, see either the added
tests, or
- In Aegisub, open a dummy video with a frame rate of 23.976
- Make a subtitle event with start time 04:44.41
- Double-click the line to (supposedly) seek to its first frame
- This will seek one frame earlier than it should, and the event will
  not be displayed on the resulting frame.
2022-11-02 02:19:38 +01:00
Thomas Goyne
b0f4c9f1ad Remove agi::vfr::Framerate's explicit swap implementation 2015-07-28 14:30:03 -07:00
Thomas Goyne
584284aa79 Reject vfr timecodes which are all identical 2014-07-15 09:11:40 -07:00
Thomas Goyne
72748d45f7 Fix crash on v1 timecode files with zero override ranges 2014-05-30 08:30:31 -07:00
Thomas Goyne
fed99649e9 Cut down on pointless uses of std::list 2014-05-26 09:34:19 -07:00
Thomas Goyne
09e325a1c3 Clean up unused includes 2014-05-23 07:28:24 -07:00
Thomas Goyne
15ae2b0ccc Eliminate a bunch of explicit constructors/destructors
Use explicitly defaulted destructors for base cases when possible,
eliminate aggregate initialization constructors where possible, and push
some more stuff to NSDMIs.
2014-04-25 14:53:24 -07:00
Thomas Goyne
1d5292fdee Kill config.h and just force-include acconf.h in non-pch builds 2014-04-16 08:11:37 -07:00
Thomas Goyne
53188cca47 Expunge remaining references to <fstream> and <iostream> 2014-03-21 14:31:48 -07:00
Thomas Goyne
d615dcb30a Replace all uses of strstream and stringstream with bufferstream
istringstream makes a copy of its input, which is not very nice for
performance. strstream doesn't do bounds checking, which is not very
nice for safety (and is deprecated).
2014-03-21 13:50:28 -07:00
Thomas Goyne
33a4a056a4 Move everything up a level since the root dir no longer has stuff 2014-03-11 12:14:57 -07:00
Renamed from aegisub/libaegisub/common/vfr.cpp (Browse further)