Commit 61dc9d64 authored by Luca Barbato's avatar Luca Barbato

udp: Fix local_port management

The default value for unset is -1, not 0.

Problem introduced in 66028b7b
parent 8655c541
......@@ -519,7 +519,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
goto fail;
}
if ((s->is_multicast || !s->local_port) && (h->flags & AVIO_FLAG_READ))
if ((s->is_multicast || s->local_port < 0) && (h->flags & AVIO_FLAG_READ))
s->local_port = port;
if (localaddr[0])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment