diff options
author | Byte <hzdbyte@gmail.com> | 2013-11-16 00:33:43 +0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-16 02:45:58 +0100 |
commit | d04b7de786780747878c080ba522405c6f542ccb (patch) | |
tree | 81dba0e49dde31337f8ec1c7077ce5171128a243 /libavformat/rtmphttp.c | |
parent | 68900bf16bb4dda35cf5f2801ce72c15056f1939 (diff) | |
download | ffmpeg-d04b7de786780747878c080ba522405c6f542ccb.tar.gz |
avformat/rtmphttp: Partial fix for the ticket #3127 (second try)
Reviewed-by: Lukasz M <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmphttp.c')
-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 49909ee8fd..8080b29cf9 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; |