comparison udp.c @ 6336:9bd0ce3f9b64 libavformat

Check for udp_set_remote_url error. Fixes issue 1784 (hang with nonsense URL/no network available).
author reimar
date Wed, 28 Jul 2010 16:27:16 +0000
parents ccb05424c391
children 1e6ebac87d44
comparison
equal deleted inserted replaced
6335:5d04171d705b 6336:9bd0ce3f9b64
353 if (hostname[0] == '\0' || hostname[0] == '?') { 353 if (hostname[0] == '\0' || hostname[0] == '?') {
354 /* only accepts null hostname if input */ 354 /* only accepts null hostname if input */
355 if (flags & URL_WRONLY) 355 if (flags & URL_WRONLY)
356 goto fail; 356 goto fail;
357 } else { 357 } else {
358 udp_set_remote_url(h, uri); 358 if (udp_set_remote_url(h, uri) < 0)
359 goto fail;
359 } 360 }
360 361
361 if (s->is_multicast && !(h->flags & URL_WRONLY)) 362 if (s->is_multicast && !(h->flags & URL_WRONLY))
362 s->local_port = port; 363 s->local_port = port;
363 udp_fd = udp_socket_create(s, &my_addr, &len); 364 udp_fd = udp_socket_create(s, &my_addr, &len);