Mercurial > libavformat.hg
changeset 5297:53688cb639b0 libavformat
Support more than 64 channels in RTMP input
author | kostya |
---|---|
date | Sun, 18 Oct 2009 07:01:06 +0000 |
parents | a280af9ae028 |
children | 0d195952a65d |
files | rtmppkt.c rtmppkt.h |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rtmppkt.c Sun Oct 18 06:58:00 2009 +0000 +++ b/rtmppkt.c Sun Oct 18 07:01:06 2009 +0000 @@ -81,6 +81,12 @@ return AVERROR(EIO); channel_id = hdr & 0x3F; + if (channel_id < 2) { //special case for channel number >= 64 + buf[1] = 0; + if (url_read_complete(h, buf, channel_id + 1) != channel_id + 1) + return AVERROR(EIO); + channel_id = AV_RL16(buf) + 64; + } data_size = prev_pkt[channel_id].data_size; type = prev_pkt[channel_id].type; extra = prev_pkt[channel_id].extra;
--- a/rtmppkt.h Sun Oct 18 06:58:00 2009 +0000 +++ b/rtmppkt.h Sun Oct 18 07:01:06 2009 +0000 @@ -25,7 +25,7 @@ #include "avformat.h" /** maximum possible number of different RTMP channels */ -#define RTMP_CHANNELS 64 +#define RTMP_CHANNELS 65599 /** * channels used to for RTMP packets with different purposes (i.e. data, network