[Bug 778702] videotimecode: Init from GDateTime

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


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

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #346313|none                        |reviewed
             status|                            |

--- Comment #8 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 346313:
 --> (https://bugzilla.gnome.org/review?bug=778702&attachment=346313)

::: 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?

@@ +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())?

-- 
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