[FFmpeg-cvslog] avformat/rtmphttp: Partial fix for the ticket #3127 (second try)

Byte git at videolan.org
Sat Nov 16 02:46:57 CET 2013


ffmpeg | branch: master | Byte <hzdbyte at gmail.com> | Sat Nov 16 00:33:43 2013 +0700| [d04b7de786780747878c080ba522405c6f542ccb] | committer: Michael Niedermayer

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

Reviewed-by: Lukasz M <lukasz.m.luki at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d04b7de786780747878c080ba522405c6f542ccb
---

 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/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 == 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;



More information about the ffmpeg-cvslog mailing list