diff options
author | Martin Storsjö <martin@martin.st> | 2012-03-07 21:40:29 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-03-07 21:52:19 +0200 |
commit | a887c87c233a55db24f3990894b650c790000884 (patch) | |
tree | aae025e6747f90b3be2b41fa31e32e6b86c2c1ad /libavformat | |
parent | 37cc8600d0313838cab5b886b9d373e5819aa24f (diff) | |
download | ffmpeg-a887c87c233a55db24f3990894b650c790000884.tar.gz |
udp: Print an error message if bind fails
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/udp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c index 8bb63c6298..93d2692a39 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -387,8 +387,10 @@ static int udp_open(URLContext *h, const char *uri, int flags) } /* bind to the local address if not multicast or if the multicast * bind failed */ - if (bind_ret < 0 && bind(udp_fd,(struct sockaddr *)&my_addr, len) < 0) + if (bind_ret < 0 && bind(udp_fd,(struct sockaddr *)&my_addr, len) < 0) { + av_log(h, AV_LOG_ERROR, "bind failed: %s\n", strerror(errno)); goto fail; + } len = sizeof(my_addr); getsockname(udp_fd, (struct sockaddr *)&my_addr, &len); |