fix ticket: 7660 Because the char '#' is used for webbrowser to display, it won't present in URI of http request.
Signed-off-by: Steven Liu <l...@chinaffmpeg.org> --- libavformat/utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 7afef545fe..f93837a805 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4731,6 +4731,7 @@ void av_url_split(char *proto, int proto_size, int *port_ptr, char *path, int path_size, const char *url) { const char *p, *ls, *ls2, *at, *at2, *col, *brk; + char *bp; if (port_ptr) *port_ptr = -1; @@ -4758,6 +4759,9 @@ void av_url_split(char *proto, int proto_size, } /* separate path from hostname */ + bp = strchr(p, '#'); + if (bp) + *bp = '\0'; ls = strchr(p, '/'); ls2 = strchr(p, '?'); if (!ls) -- 2.15.2 (Apple Git-101.1) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel