[Bug 752336] dashdemux: duration field could overflow

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Oct 1 05:29:12 PDT 2015


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

--- Comment #17 from Florin Apostol <florin.apostol at oregan.net> ---
Review of attachment 312352:
 --> (https://bugzilla.gnome.org/review?bug=752336&attachment=312352)

::: tests/check/elements/dash_mpd.c
@@ +4540,3 @@
+
+  fail_if (gst_mpdparser_parse_duration ("", &v));
+  fail_if (gst_mpdparser_parse_duration (" ", &v));

need to decide of we allow spaces or not. If yes, add some tests with spaces in
the middle of the string. For example "P T1s" will fail.

@@ +4579,3 @@
+  fail_if (gst_mpdparser_parse_duration ("PT0", &v));
+  fail_unless (gst_mpdparser_parse_duration ("PT1.1S", &v));
+  fail_if (gst_mpdparser_parse_duration ("PT1.1.1S", &v));

because you use both fail_if and fail_unless, I find it difficult to understand
what is the positive and what is the negative testcase.
Something like 
fail_unless (gst_mpdparser_parse_duration (".....", &v) == TRUE);  //for
expected success
fail_unless (gst_mpdparser_parse_duration (".....", &v) == FALSE); // for
expected failure
might be more clear to the reader.

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