[FFmpeg-devel] [PATCH 3/3] avformat/url: remove duplicate call to strstr

Zlomek, Josef josef at pex.com
Mon Jul 27 14:57:56 EEST 2020


I also noticed that the 3rd part did not make it to patchwork.
Maybe it is because it modifies the same file. I will squash it with the
first part.

Josef

On Mon, Jul 27, 2020 at 1:36 PM Steven Liu <lingjiujianke at gmail.com> wrote:

> Josef Zlomek <josef at pex.com> 于2020年7月27日周一 下午6:57写道:
> >
> > Signed-off-by: Josef Zlomek <josef at pex.com>
> > ---
> >  libavformat/url.c | 13 +++++--------
> >  1 file changed, 5 insertions(+), 8 deletions(-)
> >
> > diff --git a/libavformat/url.c b/libavformat/url.c
> > index ccaa28a1ed..28d12fd3de 100644
> > --- a/libavformat/url.c
> > +++ b/libavformat/url.c
> > @@ -186,14 +186,11 @@ void ff_make_absolute_url(char *buf, int size,
> const char *base,
> >
> >      root = p = buf;
> >      /* Get the path root of the url which start by "://" */
> > -    if (p && strstr(p, "://")) {
> > -        sep = strstr(p, "://");
> > -        if (sep) {
> > -            sep += 3;
> > -            root = strchr(sep, '/');
> > -            if (!root)
> > -                return;
> > -        }
> > +    if (p && (sep = strstr(p, "://"))) {
> > +        sep += 3;
> > +        root = strchr(sep, '/');
> > +        if (!root)
> > +            return;
> >      }
> >
> >      /* Remove the file name from the base url */
> > --
> > 2.17.1
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
> this patch cannot get from:
> https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=1869
>
>
> Thanks
> Steven
>


-- 
Josef Zlomek


More information about the ffmpeg-devel mailing list