static int udp_write(URLContext *h, const uint8_t *buf, int size)

{

    UDPContext *s = h->priv_data;

    int ret;



    for(;;) {

        if (!s->is_connected) {

            ret = sendto (s->udp_fd, buf, size, 0,

                          (struct sockaddr *) &s->dest_addr,

                          s->dest_addr_len);

        } else

            ret = send(s->udp_fd, buf, size, 0);

        if (ret < 0) {

            if (ff_neterrno() != AVERROR(EINTR) &&

                ff_neterrno() != AVERROR(EAGAIN))

                return ff_neterrno();

        } else {

            break;

        }

    }

    return size;

}

static int udp_write(URLContext *h, const uint8_t *buf, int size)

{

    UDPContext *s = h->priv_data;

    int ret;



    for(;;) {

        if (!s->is_connected) {

            ret = sendto (s->udp_fd, buf, size, 0,

                          (struct sockaddr *) &s->dest_addr,

                          s->dest_addr_len);

        } else

            ret = send(s->udp_fd, buf, size, 0);

        if (ret < 0) {

            if (ff_neterrno() != AVERROR(EINTR) &&

                ff_neterrno() != AVERROR(EAGAIN))

                return ff_neterrno();

        } else {

            break;

        }

    }

    return size;

}

static int FUNC_0(URLContext *VAR_0, const uint8_t *VAR_1, int VAR_2)

{

    UDPContext *s = VAR_0->priv_data;

    int VAR_3;



    for(;;) {

        if (!s->is_connected) {

            VAR_3 = sendto (s->udp_fd, VAR_1, VAR_2, 0,

                          (struct sockaddr *) &s->dest_addr,

                          s->dest_addr_len);

        } else

            VAR_3 = send(s->udp_fd, VAR_1, VAR_2, 0);

        if (VAR_3 < 0) {

            if (ff_neterrno() != AVERROR(EINTR) &&

                ff_neterrno() != AVERROR(EAGAIN))

                return ff_neterrno();

        } else {

            break;

        }

    }

    return VAR_2;

}

static int FUNC_0(URLContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{ UDPContext *s = VAR_0->priv_data; int VAR_3; for(;;) { if (!s->is_connected) { VAR_3 = sendto (s->udp_fd, VAR_1, VAR_2, 0,
(struct sockaddr *) &s->dest_addr,
s->dest_addr_len); } else VAR_3 = send(s->udp_fd, VAR_1, VAR_2, 0); if (VAR_3 < 0) { if (ff_neterrno() != AVERROR(EINTR) &&
ff_neterrno() != AVERROR(EAGAIN))
return ff_neterrno(); } else { break; } } return VAR_2; }