changeset 6142:bd851edc58ac libavformat

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.
author mstorsjo
date Fri, 18 Jun 2010 12:02:51 +0000
parents e4e0d0ab6ced
children 66b74fc6eeb9
files rtmpproto.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rtmpproto.c	Fri Jun 18 07:54:45 2010 +0000
+++ b/rtmpproto.c	Fri Jun 18 12:02:51 2010 +0000
@@ -915,6 +915,7 @@
             buf  += data_left;
             size -= data_left;
             rt->flv_off = rt->flv_size;
+            return data_left;
         }
         if ((ret = get_packet(s, 0)) < 0)
            return ret;