Ticket #3127: 0001-Partial-fix-for-the-ticket-3127-second-try.patch

File 0001-Partial-fix-for-the-ticket-3127-second-try.patch, 1.2 KB (added by GoodvinJ, 12 years ago)

Patch - second try

  • libavformat/rtmphttp.c

    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)  
    113113        if (ret < 0 && ret != AVERROR_EOF)
    114114            return ret;
    115115
    116         if (ret == AVERROR_EOF) {
     116        if (ret == 0 || ret == AVERROR_EOF) {
    117117            if (rt->finishing) {
    118118                /* Do not send new requests when the client wants to
    119119                 * close the connection. */
    static int rtmp_http_open(URLContext *h, const char *uri, int flags)  
    227227    /* read the server reply which contains a unique ID */
    228228    for (;;) {
    229229        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)
    231231            break;
    232232        if (ret < 0)
    233233            goto fail;