Commit 5380f5ec authored by Brendan Long's avatar Brendan Long

Merge pull request #139 from gdesmott/fix-test

Fix test
parents 4f96135d a061c137
......@@ -97,7 +97,7 @@ parse_range_part (GstDlnaSrc * dlna_src, gchar ** cursor, char *format,
if (sscanf (*cursor, format, tmp) == -1)
return FALSE;
*cursor += strlen (tmp) + 1;
*cursor += strlen (tmp);
if (result_str) {
if (*result_str)
......@@ -138,6 +138,14 @@ dlna_src_parse_npt_range (GstDlnaSrc * dlna_src, const gchar * field_str,
{
gchar *field, *cursor;
/* Init output variables */
if (start)
*start = GST_CLOCK_TIME_NONE;
if (stop)
*stop = GST_CLOCK_TIME_NONE;
if (total)
*total = 0;
/* Convert everything to upper case */
field = g_ascii_strup (field_str, -1);
......@@ -152,11 +160,13 @@ dlna_src_parse_npt_range (GstDlnaSrc * dlna_src, const gchar * field_str,
cursor++; /* '=' */
/* Read start value and '-' */
/* Read start */
if (!parse_range_part (dlna_src, &cursor, "%31[^-]-%*s", start_str, start,
FALSE))
goto fail;
cursor++; /* '-' */
/* Read stop value, if any */
if (g_ascii_isdigit (cursor[0])) {
if (!parse_range_part (dlna_src, &cursor, "%31[^/ ]%*s", stop_str, stop,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment