summaryrefslogtreecommitdiff
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorSteven Liu <lq@chinaffmpeg.org>2020-01-10 22:51:22 +0800
committerSteven Liu <lq@chinaffmpeg.org>2020-01-20 14:23:56 +0800
commitbc0bedf3c950fc5203d0d2b62019fb49edc48fb7 (patch)
tree9aff58945c4f9b07be364b2f837c27a52f8f689c /libavformat/hlsenc.c
parentb5dba152ef614c21e0537a7894ef9227b323f21d (diff)
avformat/hlsenc: compare without the last directory separator in get_relative_url
fix ticket: 8461 there is no problem before commit 75aea52a1051a22bdebd0b7a8098ac6479a529a0 Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c2
1 files changed, 1 insertions, 1 deletions
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;