Browse Source

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  rtmphttp: Check for both 0 and AVERROR_EOF

Conflicts:
	libavformat/rtmphttp.c

See: d04b7de786
Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
cbefb3d909
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/rtmphttp.c

+ 2
- 2
libavformat/rtmphttp.c View File

@@ -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 == 0 || 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)
/* 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 == 0 || ret == AVERROR_EOF)
if (!ret || ret == AVERROR_EOF)
break; break;
if (ret < 0) if (ret < 0)
goto fail; goto fail;


Loading…
Cancel
Save