On Sun, 17 Jun 2012, Samuel Pitoiset wrote:
+static int rtmp_http_close(URLContext *h) +{ + RTMP_HTTPContext *rt = h->priv_data; + uint8_t tmp_buf[2048]; + int ret = 0; + + if (rt->state >= STATE_WAITING) { + /* set stream into nonblocking mode */ + rt->stream->flags |= AVIO_FLAG_NONBLOCK; + + do { + ret = rtmp_http_read(h, tmp_buf, sizeof(tmp_buf)); + } while (ret != AVERROR(EAGAIN));
You probably want while (ret > 0) here, since if you run into some other error than EAGAIN, you'll loop infinitely.
// Martin _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel