From: Valeriy Argunov <[email protected]>
This makes RTMPT work again - it was broken by 5d876be87a.
---
libavformat/rtmphttp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c
index 89a6614..04b0b91 100644
--- a/libavformat/rtmphttp.c
+++ b/libavformat/rtmphttp.c
@@ -113,7 +113,7 @@ static int rtmp_http_read(URLContext *h, uint8_t *buf, int
size)
if (ret < 0 && ret != AVERROR_EOF)
return ret;
- if (ret == AVERROR_EOF) {
+ if (ret == 0 || ret == AVERROR_EOF) {
if (rt->finishing) {
/* Do not send new requests when the client wants to
* close the connection. */
@@ -227,7 +227,7 @@ static int rtmp_http_open(URLContext *h, const char *uri,
int flags)
/* read the server reply which contains a unique ID */
for (;;) {
ret = ffurl_read(rt->stream, rt->client_id + off,
sizeof(rt->client_id) - off);
- if (ret == AVERROR_EOF)
+ if (ret == 0 || ret == AVERROR_EOF)
break;
if (ret < 0)
goto fail;
--
1.7.9.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel