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)
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)