diff options
author | Florin Apostol <florin.apostol@oregan.net> | 2015-11-16 17:25:21 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-11-18 09:50:26 +0200 |
commit | b0950269454a9f7bee42d5d060c1a8b7bf03dff9 (patch) | |
tree | 1aec5beae411381dbe39cef75bb3e903f7364e21 /tests | |
parent | 96eb5ef33c3608a24835fd9bea17e6f2f67a2243 (diff) | |
download | gstreamer-plugins-bad-b0950269454a9f7bee42d5d060c1a8b7bf03dff9.tar.gz |
mpdparser: tests: added test for gst_mpd_client_get_last_fragment_timestamp_end
The timestamp for last fragment is incorrectly retrieved if segment templates
are used.
https://bugzilla.gnome.org/show_bug.cgi?id=758188
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/elements/dash_mpd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/check/elements/dash_mpd.c b/tests/check/elements/dash_mpd.c index b2091e37b..1f4ae3b50 100644 --- a/tests/check/elements/dash_mpd.c +++ b/tests/check/elements/dash_mpd.c @@ -4389,6 +4389,7 @@ GST_START_TEST (dash_mpdparser_segment_template) GstClockTime expectedTimestamp; GstClockTime periodStartTime; GstClockTime offset; + GstClockTime lastFragmentTimestampEnd; const gchar *xml = "<?xml version=\"1.0\"?>" "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\"" @@ -4464,6 +4465,17 @@ GST_START_TEST (dash_mpdparser_segment_template) gst_media_fragment_info_clear (&fragment); + /* + * Period starts at 10s. + * MPD has a duration of 3h3m30s, so period duration is 3h3m20s. + * We expect the last fragment to end at period start + period duration: 3h3m30s + */ + expectedTimestamp = duration_to_ms (0, 0, 0, 3, 3, 30, 0); + gst_mpd_client_get_last_fragment_timestamp_end (mpdclient, 0, + &lastFragmentTimestampEnd); + assert_equals_uint64 (lastFragmentTimestampEnd, + expectedTimestamp * GST_MSECOND); + gst_mpd_client_free (mpdclient); } |