OSDN Git Service

Check for udp_set_remote_url error.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Wed, 28 Jul 2010 16:27:16 +0000 (16:27 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Wed, 28 Jul 2010 16:27:16 +0000 (16:27 +0000)
Fixes issue 1784 (hang with nonsense URL/no network available).

Originally committed as revision 24575 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/udp.c

index 6bd5c9c..3636d8c 100644 (file)
@@ -355,7 +355,8 @@ static int udp_open(URLContext *h, const char *uri, int flags)
         if (flags & URL_WRONLY)
             goto fail;
     } else {
-        udp_set_remote_url(h, uri);
+        if (udp_set_remote_url(h, uri) < 0)
+            goto fail;
     }
 
     if (s->is_multicast && !(h->flags & URL_WRONLY))