Message ID | 20200506065122.84671-1-lq@chinaffmpeg.org |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel] avformat/dashdec: compute the segment size use current pos minus offset plus one | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Wed, May 6, 2020 at 2:53 PM Steven Liu <lq@chinaffmpeg.org> wrote: > > because the offset should use one byte > > Reported-by: Zhao Jun <barryjzhao@tencent.com>> > Signed-off-by: Steven Liu <liuqi05@kuaishou.com> > --- > libavformat/dashdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c > index 5ba7feb245..04a1baea15 100644 > --- a/libavformat/dashdec.c > +++ b/libavformat/dashdec.c > @@ -590,7 +590,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.25.0 LGTM, tested and verified
> 2020年5月6日 下午3:09,mypopy@gmail.com 写道: > > On Wed, May 6, 2020 at 2:53 PM Steven Liu <lq@chinaffmpeg.org> wrote: >> >> because the offset should use one byte >> >> Reported-by: Zhao Jun <barryjzhao@tencent.com>> >> Signed-off-by: Steven Liu <liuqi05@kuaishou.com> >> --- >> libavformat/dashdec.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c >> index 5ba7feb245..04a1baea15 100644 >> --- a/libavformat/dashdec.c >> +++ b/libavformat/dashdec.c >> @@ -590,7 +590,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.25.0 > > LGTM, tested and verified > Applied Thanks Steven Liu
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 5ba7feb245..04a1baea15 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -590,7 +590,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;
because the offset should use one byte Reported-by: Zhao Jun <barryjzhao@tencent.com>> Signed-off-by: Steven Liu <liuqi05@kuaishou.com> --- libavformat/dashdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)