diff mbox series

[FFmpeg-devel] avformat/hlsenc: compare without the last directory separator in get_relative_url

Message ID 20200110145122.28052-1-lq@chinaffmpeg.org
State Accepted
Headers show
Series [FFmpeg-devel] avformat/hlsenc: compare without the last directory separator in get_relative_url | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Liu Steven Jan. 10, 2020, 2:51 p.m. UTC
fix ticket: 8461

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/hlsenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Derek Buitenhuis Jan. 13, 2020, 4:13 p.m. UTC | #1
On 10/01/2020 14:51, Steven Liu wrote:
> fix ticket: 8461
> 
> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
> ---
>  libavformat/hlsenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Can you explain the intent? The referenced bug seems specific to Windows?

- Derek
Liu Steven Jan. 13, 2020, 4:29 p.m. UTC | #2
> 在 2020年1月14日,00:13,Derek Buitenhuis <derek.buitenhuis@gmail.com> 写道:
> 
> On 10/01/2020 14:51, Steven Liu wrote:
>> fix ticket: 8461
>> 
>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>> ---
>> libavformat/hlsenc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Can you explain the intent? The referenced bug seems specific to Windows?
Yes, windows, there no problem since commit 75aea52a1051a22bdebd0b7a8098ac6479a529a0

> 
> - Derek
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Thanks
Steven
Liu Steven Jan. 13, 2020, 4:31 p.m. UTC | #3
> 在 2020年1月14日,00:29,Steven Liu <lq@chinaffmpeg.org> 写道:
> 
> 
> 
>> 在 2020年1月14日,00:13,Derek Buitenhuis <derek.buitenhuis@gmail.com> 写道:
>> 
>> On 10/01/2020 14:51, Steven Liu wrote:
>>> fix ticket: 8461
>>> 
>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>> ---
>>> libavformat/hlsenc.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> Can you explain the intent? The referenced bug seems specific to Windows?
> Yes, windows, there no problem since commit 75aea52a1051a22bdebd0b7a8098ac6479a529a0
s/since/before/g
> 
>> 
>> - Derek
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> 
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> 
> Thanks
> Steven
> 
> 
> 
> 

Thanks
Steven
Derek Buitenhuis Jan. 13, 2020, 4:40 p.m. UTC | #4
On 13/01/2020 16:31, Steven Liu wrote:
>>> Can you explain the intent? The referenced bug seems specific to Windows?
>> Yes, windows, there no problem since commit 75aea52a1051a22bdebd0b7a8098ac6479a529a0
> s/since/before/g

OK. If you could add that in the commit message (and what broke), LGTM.

- Derek
diff mbox series

Patch

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index d130f03ea6..e87f08b0e6 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1234,7 +1234,7 @@  static const char* get_relative_url(const char *master_url, const char *media_ur
     if (!p) p = strrchr(master_url, '\\');
 
     if (p) {
-        base_len = p + 1 - master_url;
+        base_len = p - master_url;
         if (av_strncasecmp(master_url, media_url, base_len)) {
             av_log(NULL, AV_LOG_WARNING, "Unable to find relative url\n");
             return NULL;