[FFmpeg-devel] [PATCH] avformat/dashdec: fix range parsing causing issues with http byte range requests
vectronic
hello.vectronic at gmail.com
Fri Sep 13 20:43:32 EEST 2019
data size calculation was off by one as per DASH SPEC which references RFC 7233. this was then used in http byte range request causing data corruption when parsing media files referenced in manifest
fixes: 8136
Signed-off-by: vectronic <hello.vectronic at gmail.com>
---
libavformat/dashdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 74eb900eea..aa0e3598a1 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -600,7 +600,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;
--
2.20.1 (Apple Git-117)
More information about the ffmpeg-devel
mailing list