[FFmpeg-devel] [PATCH] always enable reuse for reading multicast udp
Martin Storsjö
martin
Thu Oct 7 12:02:49 CEST 2010
On Thu, 7 Oct 2010, aviad rozenhek wrote:
> 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.
That breaks the ABI and would require a major bump. But perhaps it could
be scheduled for the next bump, unless there's some code relying on
URL_RDONLY being 0?
// Martin
More information about the ffmpeg-devel
mailing list