ffmpeg | branch: master | Steven Liu <l...@chinaffmpeg.org> | Wed May  6 
14:51:22 2020 +0800| [3523df947a64c3a102960c753e81d9d04166e6e5] | committer: 
Steven Liu

avformat/dashdec: compute the segment size use current pos minus offset plus one

because the offset should use one byte

Reviewed-by: Zhao Jun <barryjz...@tencent.com>
Reported-by: Zhao Jun <barryjz...@tencent.com>
Signed-off-by: Steven Liu <liuq...@kuaishou.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3523df947a64c3a102960c753e81d9d04166e6e5
---

 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index bde4b0846d..ec2aadcee3 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -592,7 +592,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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to