diff options
author | Brendan Long <self@brendanlong.com> | 2013-10-10 13:08:25 -0700 |
---|---|---|
committer | Brendan Long <self@brendanlong.com> | 2013-10-10 13:08:25 -0700 |
commit | a4ed1c5f86d04943d770c9f31188169704be1f57 (patch) | |
tree | de63542b0c6bf518011e5d6d59c46d1df14bfd82 | |
parent | eec512d797df5c0a0c44f987f2f8999c8224d56e (diff) | |
parent | 7520989b9ad16424a45d2aaed43c33da3e413cd3 (diff) |
Merge pull request #54 from cablelabs/dtcp-cvp2-dms-fix
Added check for inclusion of byte range in TimeSeekRange header value. ...
-rw-r--r-- | src/gstdlnasrc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gstdlnasrc.c b/src/gstdlnasrc.c index bdd1954..4ac320a 100644 --- a/src/gstdlnasrc.c +++ b/src/gstdlnasrc.c @@ -2575,12 +2575,13 @@ dlna_src_head_response_parse_time_seek (GstDlnaSrc * dlna_src, else head_response->time_seek_response_received = TRUE; - // Extract start and end bytes from TimeSeekRange header - if (!dlna_src_parse_byte_range (dlna_src, field_str, HEADER_INDEX_BYTES, - &head_response->byte_seek_start, - &head_response->byte_seek_end, &head_response->byte_seek_total)) - // Return, errors which have been logged already - return FALSE; + // Extract start and end bytes from TimeSeekRange header if present + if (strstr (field_str, RANGE_HEADERS[HEADER_INDEX_BYTES])) { + if (!dlna_src_parse_byte_range (dlna_src, field_str, HEADER_INDEX_BYTES, + &head_response->byte_seek_start, + &head_response->byte_seek_end, &head_response->byte_seek_total)) + return FALSE; + } return TRUE; } @@ -2677,7 +2678,7 @@ dlna_src_parse_byte_range (GstDlnaSrc * dlna_src, header = strstr (field_str, RANGE_HEADERS[header_index]); if (header) header_value = strstr (header, "="); - if (!header_value) + if (header && !header_value) header_value = strstr (header, " "); if (header_value) header_value++; |