[FFmpeg-devel] [PATCH] always enable reuse for reading multicast udp

aviad rozenhek aviadr1
Thu Oct 7 12:00:10 CEST 2010


On Thu, Oct 7, 2010 at 05:46, Martin Storsj? <martin at martin.st> wrote:

> On Thu, 7 Oct 2010, aviad rozenhek wrote:
>
> > >
> > > > @@ -361,6 +364,8 @@ static int udp_open(URLContext *h, const char
> *uri,
> > > int flags)
> > > >
> > > >      if (s->is_multicast && !(h->flags & URL_WRONLY))
> > > >          s->local_port = port;
> > > > +    if(s->is_multicast && !has_reuse_arg && !(h->flags & (URL_WRONLY
> |
> > > URL_RDWR)))
> > > > +        s->reuse_socket = 1;
> > >
> > > Couldn't you do just && h->flags & URL_RDONLY at the end?
> > >
> > >
> > no because URL_RDONLY is #defined to be 0
>
> Ah, good point.
>
>
btw, how about we change the flag values to be

#define URL_RDONLY 1
#define URL_WRONLY 2
#define URL_RDWR 3

?
this would be a seperate patch obviously.



More information about the ffmpeg-devel mailing list