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

Michael Niedermayer michaelni
Sat Jul 3 11:56:53 CEST 2010


On Fri, Jul 02, 2010 at 11:43:08PM -0700, Eli Friedman wrote:
> On Sun, Jun 27, 2010 at 3:08 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> > 2010/6/27 M?ns Rullg?rd <mans at mansr.com>:
> >> 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.
> >
> > Actually, I think the check was never correct... see
> > http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-October/077001.html
> > .
> >
> > New version attached which also eliminates the unused variable (I
> > didn't spot it originally because there are other warnings in the
> > file).
> 
> Ping.

i remember this line of code with the flags issue comming up in the past
id like to reread that discussion before deciding so we dont miss some
past conclusions.
but i would have to find that past discussion first ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100703/e9c09b1e/attachment.pgp>



More information about the ffmpeg-devel mailing list