Revision b1eb53ab

View differences:

libavformat/rtmppkt.c
151 151
    int off = 0;
152 152

  
153 153
    //TODO: header compression
154
    bytestream_put_byte(&p, pkt->channel_id | (mode << 6));
154
    if (pkt->channel_id < 64) {
155
        bytestream_put_byte(&p, pkt->channel_id | (mode << 6));
156
    } else if (pkt->channel_id < 64 + 256) {
157
        bytestream_put_byte(&p, 0               | (mode << 6));
158
        bytestream_put_byte(&p, pkt->channel_id - 64);
159
    } else {
160
        bytestream_put_byte(&p, 1               | (mode << 6));
161
        bytestream_put_le16(&p, pkt->channel_id - 64);
162
    }
155 163
    if (mode != RTMP_PS_ONEBYTE) {
156 164
        bytestream_put_be24(&p, pkt->timestamp >= 0xFFFFFF ? 0xFFFFFF : pkt->timestamp);
157 165
        if (mode != RTMP_PS_FOURBYTES) {

Also available in: Unified diff