mirror of
https://github.com/libretro/FFmpeg.git
synced 2026-11-12 18:39:34 -10:00
rtmphttp: Check for both 0 and AVERROR_EOF
This makes RTMPT work again - it was broken by 5d876be87a.
Signed-off-by: Martin Storsjö <[email protected]>
This commit is contained in:
1 parent
1c01b0253e
commit
cc20fbcd39
1 file changed
+2
-2
@@ -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 || 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 || ret == AVERROR_EOF)
|
||||
break;
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
Reference in new issue
Block a user