@@ -588,7 +588,7 @@ static struct fragment * get_Fragment(char *range)
char *str_end_offset;
char *str_offset = av_strtok(range, "-", &str_end_offset);
seg->url_offset = strtoll(str_offset, NULL, 10);
- seg->size = strtoll(str_end_offset, NULL, 10) - seg->url_offset;
+ seg->size = strtoll(str_end_offset, NULL, 10) - seg->url_offset + 1;
}
return seg;
@@ -1581,7 +1581,7 @@ static int open_input(DASHContext *c, struct representation *pls, struct fragmen
/* try to restrict the HTTP request to the part we want
* (if this is in fact a HTTP request) */
av_dict_set_int(&opts, "offset", seg->url_offset, 0);
- av_dict_set_int(&opts, "end_offset", seg->url_offset + seg->size, 0);
+ av_dict_set_int(&opts, "end_offset", seg->url_offset + seg->size - 1, 0);
}
ff_make_absolute_url(url, c->max_url_size, c->base_url, seg->url);