mirror of https://git.ffmpeg.org/ffmpeg.git
Support more than 64 channels in RTMP input
Originally committed as revision 20270 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
8f648b74c3
commit
5d660598b0
|
@ -81,6 +81,12 @@ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p,
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
channel_id = hdr & 0x3F;
|
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;
|
data_size = prev_pkt[channel_id].data_size;
|
||||||
type = prev_pkt[channel_id].type;
|
type = prev_pkt[channel_id].type;
|
||||||
extra = prev_pkt[channel_id].extra;
|
extra = prev_pkt[channel_id].extra;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
|
|
||||||
/** maximum possible number of different RTMP channels */
|
/** 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
|
* channels used to for RTMP packets with different purposes (i.e. data, network
|
||||||
|
|
Loading…
Reference in New Issue