diff rtmpproto.c @ 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 7fdda2416684
children 4fc5e0e4e1cd
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;