mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
timecode: Fix invalid drop-frame timecode right before a new second
The previous fix was only working for non-drop-frame timecodes. https://bugzilla.gnome.org/show_bug.cgi?id=779866
This commit is contained in:
parent
910b2ca6d2
commit
bdccc98ee2
1 changed files with 2 additions and 1 deletions
|
@ -229,7 +229,8 @@ gst_video_time_code_init_from_date_time (GstVideoTimeCode * tc,
|
|||
frames =
|
||||
gst_util_uint64_scale_round (g_date_time_get_microsecond (dt) *
|
||||
G_GINT64_CONSTANT (1000), fps_n, fps_d * GST_SECOND);
|
||||
if (G_UNLIKELY (frames == fps_n)) {
|
||||
if (G_UNLIKELY (((frames == fps_n) && (fps_d == 1)) ||
|
||||
((frames == fps_n / 1000) && (fps_d == 1001)))) {
|
||||
/* Avoid invalid timecodes */
|
||||
frames--;
|
||||
add_a_frame = TRUE;
|
||||
|
|
Loading…
Reference in a new issue