X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frtmphttp.c;h=0334ba558c9876603d8ae14cfd5b043b59bea87d;hb=be0b869b04c049ea00fd178bb4c4fe4b767ed31d;hp=8080b29cf9b75f308f53418b3d96b412634036dc;hpb=85b7b0c519f8d9491b4c0340329a605cc97c8984;p=ffmpeg diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c index 8080b29cf9b..0334ba558c9 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 == 0 || ret == AVERROR_EOF) { + if (!ret || 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 == 0 || ret == AVERROR_EOF) + if (!ret || ret == AVERROR_EOF) break; if (ret < 0) goto fail;