mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-10 01:59:30 +00:00
dashdemux2: Remove bogus limitation checks for duration fields
Just like for the seconds field, there are no limitations on the hours and minutes fields. The specification for xml schema duration fields doesn't forbid specifying durations with only (huge) minutes or hours values. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2951>
This commit is contained in:
parent
1e269a3c6d
commit
855dabb578
|
@ -198,10 +198,6 @@ _mpd_helper_parse_duration (const char *str, guint64 * value)
|
|||
goto error;
|
||||
}
|
||||
hours = read;
|
||||
if (hours >= 24) {
|
||||
GST_WARNING ("Hour out of range");
|
||||
goto error;
|
||||
}
|
||||
break;
|
||||
case 'M':
|
||||
if (minutes != -1 || seconds != -1) {
|
||||
|
@ -209,10 +205,6 @@ _mpd_helper_parse_duration (const char *str, guint64 * value)
|
|||
goto error;
|
||||
}
|
||||
minutes = read;
|
||||
if (minutes >= 60) {
|
||||
GST_WARNING ("Minute out of range");
|
||||
goto error;
|
||||
}
|
||||
break;
|
||||
case 'S':
|
||||
if (have_ms) {
|
||||
|
|
|
@ -5732,11 +5732,10 @@ GST_START_TEST (dash_mpdparser_duration)
|
|||
fail_unless (_mpd_helper_parse_duration ("P35D", &v) == FALSE);
|
||||
fail_unless (_mpd_helper_parse_duration ("P-1Y", &v) == FALSE);
|
||||
fail_unless (_mpd_helper_parse_duration ("PT-1H", &v) == FALSE);
|
||||
fail_unless (_mpd_helper_parse_duration ("PT25H", &v) == FALSE);
|
||||
fail_unless (_mpd_helper_parse_duration ("PT25H", &v) == TRUE);
|
||||
fail_unless (_mpd_helper_parse_duration ("PT-1M", &v) == FALSE);
|
||||
fail_unless (_mpd_helper_parse_duration ("PT65M", &v) == FALSE);
|
||||
fail_unless (_mpd_helper_parse_duration ("PT65M", &v) == TRUE);
|
||||
fail_unless (_mpd_helper_parse_duration ("PT-1S", &v) == FALSE);
|
||||
/* seconds are allowed to be larger than 60 */
|
||||
fail_unless (_mpd_helper_parse_duration ("PT65S", &v) == TRUE);
|
||||
|
||||
fail_unless (_mpd_helper_parse_duration ("PT1.1H", &v) == FALSE);
|
||||
|
|
Loading…
Reference in a new issue