aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/librtmp.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2018-07-26 00:37:35 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2018-07-28 01:11:30 +0200
commitd6d7853b4b12ec85081c12883f70bde2ec2e0084 (patch)
treef887da68435dbe3c6f7e277adcfce3fe9aa03ecb /libavformat/librtmp.c
parentdb923b3fbd3af266f8484ac55cca149797c6e18e (diff)
downloadffmpeg-d6d7853b4b12ec85081c12883f70bde2ec2e0084.tar.gz
avformat/librtmp: fix returning EOF from Read/Write
Ticket #7052
Diffstat (limited to 'libavformat/librtmp.c')
-rw-r--r--libavformat/librtmp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c
index f3cfa9a8e2..43013e46e0 100644
--- a/libavformat/librtmp.c
+++ b/libavformat/librtmp.c
@@ -261,7 +261,10 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
LibRTMPContext *ctx = s->priv_data;
RTMP *r = &ctx->rtmp;
- return RTMP_Write(r, buf, size);
+ int ret = RTMP_Write(r, buf, size);
+ if (!ret)
+ return AVERROR_EOF;
+ return ret;
}
static int rtmp_read(URLContext *s, uint8_t *buf, int size)
@@ -269,7 +272,10 @@ static int rtmp_read(URLContext *s, uint8_t *buf, int size)
LibRTMPContext *ctx = s->priv_data;
RTMP *r = &ctx->rtmp;
- return RTMP_Read(r, buf, size);
+ int ret = RTMP_Read(r, buf, size);
+ if (!ret)
+ return AVERROR_EOF;
+ return ret;
}
static int rtmp_read_pause(URLContext *s, int pause)