diff options
author | Valeriy Argunov <hzdbyte@gmail.com> | 2013-11-16 00:33:43 +0700 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-11-18 12:36:32 +0200 |
commit | cc20fbcd39c7b60602edae4f7deb092ecfd3c975 (patch) | |
tree | 22b53a008edb5dad315d105437383dd6e1075776 | |
parent | 1c01b0253ebfe05f907c3a723101fe77f6dd2336 (diff) | |
download | ffmpeg-cc20fbcd39c7b60602edae4f7deb092ecfd3c975.tar.gz |
rtmphttp: Check for both 0 and AVERROR_EOF
This makes RTMPT work again - it was broken by 5d876be87a.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/rtmphttp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c index 89a661435c..34c68fb437 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 || 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; |