comparison rtmppkt.c @ 5296:a280af9ae028 libavformat

Accept RTMP packets with one-byte header
author kostya
date Sun, 18 Oct 2009 06:58:00 +0000
parents cc34279f0fab
children 53688cb639b0
comparison
equal deleted inserted replaced
5295:08ec48911f20 5296:a280af9ae028
85 type = prev_pkt[channel_id].type; 85 type = prev_pkt[channel_id].type;
86 extra = prev_pkt[channel_id].extra; 86 extra = prev_pkt[channel_id].extra;
87 87
88 hdr >>= 6; 88 hdr >>= 6;
89 if (hdr == RTMP_PS_ONEBYTE) { 89 if (hdr == RTMP_PS_ONEBYTE) {
90 //todo 90 timestamp = prev_pkt[channel_id].timestamp;
91 return -1;
92 } else { 91 } else {
93 if (url_read_complete(h, buf, 3) != 3) 92 if (url_read_complete(h, buf, 3) != 3)
94 return AVERROR(EIO); 93 return AVERROR(EIO);
95 timestamp = AV_RB24(buf); 94 timestamp = AV_RB24(buf);
96 if (hdr != RTMP_PS_FOURBYTES) { 95 if (hdr != RTMP_PS_FOURBYTES) {