1. H264视频的RTP封包 static int h264_parse(Track *tr, uint8_t *data, size_t len) { h264_priv *priv = tr->private_data; // double nal_time; // see page 9 and 7.4.1.2 size_t nalsize = 0, index = 0; uint8_t *p, *q; if (priv->is_avc) { while (1) { unsigned int i; if(index >= len) break; //get the nal size nalsize = 0; for(i = 0; i < priv->nal_length_size; i++) nalsize = (nalsize << 8) | data[index++]; if(nalsize <= 1 || nalsize > len) { if(nalsize == 1) { index++; continue; } else { fnc_log(FNC_LOG_VERBOSE, "[h264] AVC: nal size %d", nalsize); break; } } if (DEFAULT_MTU >= nalsize) { mparser_buffer_write(tr, tr->properties.pts, tr->properties.dts, tr->properties.frame_duration, 1,