diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-19 11:12:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-19 11:22:39 +0100 |
commit | 4f8540ba40b79cacf14600c0ac2da5f5d5dc604f (patch) | |
tree | 867bdc0486b43e284b4f37086cf08dade90e9afe | |
parent | b61cb61ab8f9abca98cc8c4d67cbefdb30f1e82a (diff) | |
parent | 8dc72eeaf647736c287b59a3856a11904bedd58b (diff) | |
download | ffmpeg-4f8540ba40b79cacf14600c0ac2da5f5d5dc604f.tar.gz |
Merge commit '8dc72eeaf647736c287b59a3856a11904bedd58b'
* commit '8dc72eeaf647736c287b59a3856a11904bedd58b':
udp: Fix crashes after adding AVOptions
See: aefed6ca87971a9d277157c92fef4cdd42c5c1e2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/udp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c index d693965cf7..b6a4724309 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -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; |