Allocate the channel arrays dynamically
commita9282329c3be3bb95f31137867fad9920b682d6d
authorMartin Storsjo <martin@martin.st>
Wed, 30 May 2012 19:07:23 +0000 (30 22:07 +0300)
committerHoward Chu <hyc@highlandsun.com>
Tue, 30 Oct 2012 16:03:21 +0000 (30 09:03 -0700)
treed696ba023a19c564ac9f399363c131d31a4a590d
parent0fb1d9936fb25f0755bb8b4afc95db048efe4526
Allocate the channel arrays dynamically

This avoids having to allocate space for all theoretical channels
if most of them aren't used. This drops the size of the full
RTMP struct from over 1200 KB to 16 KB (on 64 bit), and as long as
only channels with a low number are used, the amount of total
allocated memory stays far below what it was before.
librtmp/rtmp.c
librtmp/rtmp.h