Revision 814c5641

View differences:

libavformat/tcp.c
44 44
    char hostname[1024],proto[1024],path[1024];
45 45
    char portstr[10];
46 46

  
47
    if(!ff_network_init())
48
        return AVERROR(EIO);
49

  
50 47
    url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
51 48
        &port, path, sizeof(path), uri);
52 49
    if (strcmp(proto,"tcp") || port <= 0 || port >= 65536)
......
192 189
{
193 190
    TCPContext *s = h->priv_data;
194 191
    closesocket(s->fd);
195
    ff_network_close();
196 192
    av_free(s);
197 193
    return 0;
198 194
}
libavformat/udp.c
320 320

  
321 321
    is_output = (flags & URL_WRONLY);
322 322

  
323
    if(!ff_network_init())
324
        return AVERROR(EIO);
325

  
326 323
    s = av_mallocz(sizeof(UDPContext));
327 324
    if (!s)
328 325
        return AVERROR(ENOMEM);
......
482 479
    if (s->is_multicast && !(h->flags & URL_WRONLY))
483 480
        udp_leave_multicast_group(s->udp_fd, (struct sockaddr *)&s->dest_addr);
484 481
    closesocket(s->udp_fd);
485
    ff_network_close();
486 482
    av_free(s);
487 483
    return 0;
488 484
}

Also available in: Unified diff