rtmp: Allocate the prev_pkt arrays dynamically
authorMartin Storsjö <martin@martin.st>
Fri, 11 Oct 2013 19:16:04 +0000 (22:16 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 14 Oct 2013 11:27:35 +0000 (14:27 +0300)
commit84a125c4c28f3e3e215d2e6c32f7f0ec43bbc04c
treead5331b186777912b07d2eba532488019466afa3
parent39185ec4faa9ef33954dbf2394444e045b632673
rtmp: Allocate the prev_pkt arrays dynamically

Normally, all channel ids are between 0 and 10, while they in
uncommon cases can have values up to 64k.

This avoids allocating two arrays for up to 64k entries (at a total
of over 6 MB in size) each when most of them aren't used at all.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtmppkt.c
libavformat/rtmppkt.h
libavformat/rtmpproto.c