[Bug 778702] videotimecode: Init from GDateTime

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Feb 22 19:01:49 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=778702

Vivia Nikolaidou <vivia at ahiru.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vivia at ahiru.eu

--- Comment #9 from Vivia Nikolaidou <vivia at ahiru.eu> ---
(In reply to Sebastian Dröge (slomo) from comment #8)
> Review of attachment 346313 [details] [review]:
> 
> ::: gst-libs/gst/video/gstvideotimecode.c
> @@ +229,3 @@
> +  if (tc->config.flags & GST_VIDEO_TIME_CODE_FLAGS_DROP_FRAME) {
> +    guint df = gst_util_uint64_scale_round (1,
> +        tc->config.fps_n, tc->config.fps_d) / 15;
> 
> This looks weird. No reason to use gst_util_uint64_scale*() here as all
> arguments are plain ints and this is never going to overflow... and the / 15
> could as well be multiple to the fps_d, no?

fps_d will be 1001. I'm fairly sure that can't be divided by 15 :)

> @@ +235,3 @@
> +  }
> +
> +  g_return_if_fail (gst_video_time_code_is_valid (tc));
> 
> Why would this not be valid after initialized like this? Are there possible
> cases? And if so, would it be a programming error from the user
> (g_return_if_fail()), or an internal inconsistency (g_assert())?

Programming error from the user, so g_return_if_fail is correct.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list