Commit d04b7de7 authored by Byte's avatar Byte Committed by Michael Niedermayer

avformat/rtmphttp: Partial fix for the ticket #3127 (second try)

Reviewed-by: 's avatarLukasz M <lukasz.m.luki@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 68900bf1
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment