提交 e8ccf245 编写于 作者: M Martin Storsjö

RTMP: Return from rtmp_read as soon as some data is available

Earlier, the function only returned when the enough data to fill the
requested buffer was available. This lead to high latency when receiving
low-bandwidth streams.

Originally committed as revision 23642 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 a80af87e
...@@ -915,6 +915,7 @@ static int rtmp_read(URLContext *s, uint8_t *buf, int size) ...@@ -915,6 +915,7 @@ static int rtmp_read(URLContext *s, uint8_t *buf, int size)
buf += data_left; buf += data_left;
size -= data_left; size -= data_left;
rt->flv_off = rt->flv_size; rt->flv_off = rt->flv_size;
return data_left;
} }
if ((ret = get_packet(s, 0)) < 0) if ((ret = get_packet(s, 0)) < 0)
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册