[FFmpeg-devel] [PATCH] avformat/avio: Remove no-op code in url_find_protocol().

Muhammad Faiz mfcc64 at gmail.com
Fri Jul 7 05:56:46 EEST 2017


On Fri, Jul 7, 2017 at 9:18 AM, Wan-Teh Chang
<wtc-at-google.com at ffmpeg.org> wrote:
> In url_find_protocol(), proto_str is either "file" or a string
> consisting of only the characters in URL_SCHEME_CHARS, which does not
> include ','. Therefore the strchr(proto_str, ',') call always returns
> NULL.
>
> Note: The code was added in commit
> 6161c41817f6e53abb3021d67ca0f19def682718.
>
> Signed-off-by: Wan-Teh Chang <wtc at google.com>
> ---
>  libavformat/avio.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/libavformat/avio.c b/libavformat/avio.c
> index 1e79c9dd5c..64248e098b 100644
> --- a/libavformat/avio.c
> +++ b/libavformat/avio.c
> @@ -263,8 +263,6 @@ static const struct URLProtocol *url_find_protocol(const char *filename)
>          av_strlcpy(proto_str, filename,
>                     FFMIN(proto_len + 1, sizeof(proto_str)));
>
> -    if ((ptr = strchr(proto_str, ',')))
> -        *ptr = '\0';

What about handling "subfile," ?


More information about the ffmpeg-devel mailing list