Revision 1642cb6b libavformat/tcp.c

View differences:

libavformat/tcp.c
53 53
    if (port <= 0 || port >= 65536)
54 54
        goto fail;
55 55

  
56
    if(!ff_network_init())
57
        return AVERROR(EIO);
58

  
56 59
    dest_addr.sin_family = AF_INET;
57 60
    dest_addr.sin_port = htons(port);
58 61
    if (resolve_host(&dest_addr.sin_addr, hostname) < 0)
......
174 177
{
175 178
    TCPContext *s = h->priv_data;
176 179
    closesocket(s->fd);
180
    ff_network_close();
177 181
    av_free(s);
178 182
    return 0;
179 183
}

Also available in: Unified diff