[FFmpeg-devel] [PATCH] Fix warning in url_resetbuf (in aviobuf.c)

Måns Rullgård mans
Sun Jun 27 23:38:20 CEST 2010


Eli Friedman <eli.friedman at gmail.com> writes:

> Patch attached; note that there isn't any functionality change because
> URL_RDWR is 2, which makes the entire RHS of the || collapse to 0.
>
> -Eli
>
> Index: libavformat/aviobuf.c
> ===================================================================
> --- libavformat/aviobuf.c	(revision 23833)
> +++ libavformat/aviobuf.c	(working copy)
> @@ -606,7 +606,7 @@
>  {
>  #if LIBAVFORMAT_VERSION_MAJOR < 53
>      URLContext *h = s->opaque;
> -    if ((flags & URL_RDWR) || (h && h->flags != flags && !h->flags & URL_RDWR))

That last bit of that expression should obviously be !(h->flags & URL_RDWR),

> +    if (flags & URL_RDWR)
>          return AVERROR(EINVAL);

so this change is probably not correct.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list