Commit Graph

16 Commits

Author SHA1 Message Date
Limin Wang 79723c2a87 avutil/timecode: add function av_timecode_get_smpte()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-28 21:00:52 +08:00
Gyan Doshi b6652f5100 avutil/timecode: fix starting frame number for 59.94 fps
The existing code for adjusting starting frame number assumes 29.97 as
stream fps.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-23 01:53:34 +01:00
Gyan Doshi 84556ef059 lavu/timecode: clarify error msg for timecode_rate
The user-supplied value for timecode_rate in drawtext is rounded
to nearest integer. So, a supplied value of 0.49 or lower is rounded to 0.
This throws a misleading error message which says "Timecode frame rate must be
specified". Changed message to account for values under one.

Also noted supported framerates for drop TC.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-10 00:53:11 +01:00
Clément Bœsch 549045254c Fix all -Wformat warnings raised by DJGPP 2017-03-29 14:49:29 +02:00
Michael Niedermayer b46dcd5209 avutil/timecode: Fix fps check
The fps variable is explicitly set to -1 in case of some errors, the check must
thus be signed or the code setting it needs to use 0 as error code
the type of the field could be changed as well but its in an installed header

Fixes: integer overflow
Fixes: 9982cc157b1ea90429435640a989122f/asan_generic_3ad004a_3799_22cf198d9cd09928e2d9ad250474fa58.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 04:09:48 +01:00
Vittorio Giovara 63ea8e0610 timecode: Support HFR values 2015-10-26 15:05:26 +01:00
Vittorio Giovara 8c22148220 timecode: Do not fail for non-standard framerates
Instead just warn, and use the parse fps normally.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-26 15:05:05 +01:00
Thierry Foucu 12875df324 Timecode: Support 48fps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 03:25:41 +02:00
Jason 77b740ac0a lavu/timecode: fix time code calculation for 60000/1001 drop frame
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-24 21:06:24 +01:00
Jason a717fa84ed lavu/timecode: Allow drop frame mode for 60000/1001 fps
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-24 21:06:24 +01:00
Stefano Sabatini 74a50e75a8 lavu: drop disabled FF_API_OLD_TC_ADJUST_FRAMENUM code 2012-11-04 18:10:39 +01:00
Clément Bœsch 4b365b0868 lavu/timecode: add av_timecode_check_frame_rate(). 2012-08-08 09:11:26 +02:00
Clément Bœsch 1f68be4764 timecode: show frame rate when invalid. 2012-08-01 17:36:37 +02:00
Matthieu Bouron 789f8cb03a avutil: support 50 and 60 frame rates in timecode api
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-27 13:41:58 +02:00
Clément Bœsch 9477fa094b lavu/timecode: use @see for URL in doxygen. 2012-02-03 00:56:27 +01:00
Clément Bœsch 0eaa123b34 lavu: add public timecode API. 2012-02-02 14:30:28 +01:00