32 int len,
h, max_packet_size;
35 int begin_of_slice, end_of_slice, frame_type, temporal_reference;
41 temporal_reference = 0;
44 int begin_of_sequence;
46 begin_of_sequence = 0;
47 len = max_packet_size - 4;
60 if((start_code & 0xFFFFFF00) == 0x100) {
62 if (start_code == 0x100) {
63 frame_type = (r[1] & 0x38) >> 3;
64 temporal_reference = (int)r[0] << 2 | r[1] >> 6;
66 if (start_code == 0x1B8) {
67 begin_of_sequence = 1;
70 if (r - buf1 - 4 <= len) {
72 if (begin_of_slice == 0) {
80 if ((r1 - buf1 > 4) && (r - r1 < max_packet_size)) {
93 h |= temporal_reference << 16;
94 h |= begin_of_sequence << 13;
95 h |= begin_of_slice << 12;
96 h |= end_of_slice << 11;
105 memcpy(q, buf1, len);
114 begin_of_slice = end_of_slice;
static av_cold int end(AVCodecContext *avctx)
const uint8_t * avpriv_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state)
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
static const uint8_t start_code[]
void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size)
common internal api header.
void * priv_data
Format private data.