Skip to content
Snippets Groups Projects
Commit cc20fbcd authored by Valeriy Argunov's avatar Valeriy Argunov Committed by Martin Storsjö
Browse files

rtmphttp: Check for both 0 and AVERROR_EOF


This makes RTMPT work again - it was broken by 5d876be8.

Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent 1c01b025
Branches
Tags
No related merge requests found
...@@ -113,7 +113,7 @@ static int rtmp_http_read(URLContext *h, uint8_t *buf, int size) ...@@ -113,7 +113,7 @@ static int rtmp_http_read(URLContext *h, uint8_t *buf, int size)
if (ret < 0 && ret != AVERROR_EOF) if (ret < 0 && ret != AVERROR_EOF)
return ret; return ret;
if (ret == AVERROR_EOF) { if (!ret || ret == AVERROR_EOF) {
if (rt->finishing) { if (rt->finishing) {
/* Do not send new requests when the client wants to /* Do not send new requests when the client wants to
* close the connection. */ * close the connection. */
...@@ -227,7 +227,7 @@ static int rtmp_http_open(URLContext *h, const char *uri, int flags) ...@@ -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 */ /* read the server reply which contains a unique ID */
for (;;) { for (;;) {
ret = ffurl_read(rt->stream, rt->client_id + off, sizeof(rt->client_id) - off); ret = ffurl_read(rt->stream, rt->client_id + off, sizeof(rt->client_id) - off);
if (ret == AVERROR_EOF) if (!ret || ret == AVERROR_EOF)
break; break;
if (ret < 0) if (ret < 0)
goto fail; goto fail;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment