[Bug 780446] gst_rtp_buffer_ext_timestamp() math is incorrect for big jumps

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Apr 10 09:24:45 UTC 2017


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

--- Comment #12 from George Kiagiadakis <gkiagia at tolabaki.gr> ---
(In reply to George Kiagiadakis from comment #11)
> The original issue that was discovered with this function is that when ext
> is already G_MAXUINT32 + 1 and you try to set G_MAXUINT32 for the timestamp,
> it awkwardly returns 3*G_MAXUINT32 + 2.

...this is basically the same thing that I check in the very first lines of the
unit test, with all variables being minus G_MAXUINT32+1:

+  result = gst_rtp_buffer_ext_timestamp (&exttimestamp, 0);
+  fail_unless_equals_uint64 (result, 0);
+  result = gst_rtp_buffer_ext_timestamp (&exttimestamp,
+      ((guint64) G_MAXINT32) + 1);
+  fail_unless_equals_uint64 (result, ((guint64) G_MAXINT32) + 1);

If you run this without applying the patch, the last check will fail and
'result' will equal G_MAXUINT32 + G_MAXINT32 + 2.

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