#include "avformat.h"
#include <unistd.h>
#include "network.h"
+#include "os_support.h"
#include <sys/time.h>
typedef struct TCPContext {
if (!s)
return AVERROR(ENOMEM);
h->priv_data = s;
+ h->is_streamed = 1;
if (port <= 0 || port >= 65536)
goto fail;
+ if(!ff_network_init())
+ return AVERROR(EIO);
+
dest_addr.sin_family = AF_INET;
dest_addr.sin_port = htons(port);
if (resolve_host(&dest_addr.sin_addr, hostname) < 0)
{
TCPContext *s = h->priv_data;
closesocket(s->fd);
+ ff_network_close();
av_free(s);
return 0;
}