From b9be9a843fb11f13c8bfd351ac2fa64c7b1bfbb9 Mon Sep 17 00:00:00 2001
From: Byte <hzdbyte@gmail.com>
Date: Sat, 16 Nov 2013 00:33:43 +0700
Subject: [PATCH] Partial fix for the ticket #3127 (second try)
---
libavformat/rtmphttp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c
index 49909ee..8080b29 100644
|
a
|
b
|
static int rtmp_http_read(URLContext *h, uint8_t *buf, int size)
|
| 113 | 113 | if (ret < 0 && ret != AVERROR_EOF) |
| 114 | 114 | return ret; |
| 115 | 115 | |
| 116 | | if (ret == AVERROR_EOF) { |
| | 116 | if (ret == 0 || ret == AVERROR_EOF) { |
| 117 | 117 | if (rt->finishing) { |
| 118 | 118 | /* Do not send new requests when the client wants to |
| 119 | 119 | * close the connection. */ |
| … |
… |
static int rtmp_http_open(URLContext *h, const char *uri, int flags)
|
| 227 | 227 | /* read the server reply which contains a unique ID */ |
| 228 | 228 | for (;;) { |
| 229 | 229 | ret = ffurl_read(rt->stream, rt->client_id + off, sizeof(rt->client_id) - off); |
| 230 | | if (ret == AVERROR_EOF) |
| | 230 | if (ret == 0 || ret == AVERROR_EOF) |
| 231 | 231 | break; |
| 232 | 232 | if (ret < 0) |
| 233 | 233 | goto fail; |