Merge commit '8dc72eeaf647736c287b59a3856a11904bedd58b'
* commit '8dc72eeaf647736c287b59a3856a11904bedd58b':
udp: Fix crashes after adding AVOptions
See: aefed6ca87
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
4f8540ba40
@ -113,7 +113,7 @@ static const AVOption options[] = {
|
||||
{ "buffer_size", "System data size (in bytes)", OFFSET(buffer_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E },
|
||||
{ "localport", "Local port", OFFSET(local_port), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, D|E },
|
||||
{ "local_port", "Local port", OFFSET(local_port), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E },
|
||||
{ "localaddr", "Local address", OFFSET(localaddr), AV_OPT_TYPE_STRING, { .str = "" }, .flags = D|E },
|
||||
{ "localaddr", "Local address", OFFSET(localaddr), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = D|E },
|
||||
{ "udplite_coverage", "choose UDPLite head size which should be validated by checksum", OFFSET(udplite_coverage), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, D|E },
|
||||
{ "pkt_size", "set size of UDP packets", OFFSET(pkt_size), AV_OPT_TYPE_INT, { .i64 = 1472 }, -1, INT_MAX, D|E },
|
||||
{ "pkt_size", "Maximum UDP packet size", OFFSET(pkt_size), AV_OPT_TYPE_INT, { .i64 = 1472 }, -1, INT_MAX, .flags = D|E },
|
||||
@ -360,7 +360,7 @@ static int udp_socket_create(UDPContext *s, struct sockaddr_storage *addr,
|
||||
|
||||
if (((struct sockaddr *) &s->dest_addr)->sa_family)
|
||||
family = ((struct sockaddr *) &s->dest_addr)->sa_family;
|
||||
res0 = udp_resolve_host(localaddr[0] ? localaddr : NULL, s->local_port,
|
||||
res0 = udp_resolve_host((localaddr && localaddr[0]) ? localaddr : NULL, s->local_port,
|
||||
SOCK_DGRAM, family, AI_PASSIVE);
|
||||
if (!res0)
|
||||
goto fail;
|
||||
|
Loading…
Reference in New Issue
Block a user