36 if (end - start < nal_length_size)
38 while (nal_length_size--)
39 res = (res << 8) | *start++;
41 if (res > end - start)
51 av_log(s1,
AV_LOG_DEBUG,
"Sending NAL %x of len %d M=%d\n", buf[0] & 0x1F, size, last);
52 if (size <= s->max_payload_size) {
60 "NAL size %d > %d, try -slice-max-size %d\n", size,
76 s->
buf[1] &= ~(1 << 7);
79 memcpy(&s->
buf[2], buf, size);
const uint8_t * ff_avc_find_startcode(const uint8_t *p, const uint8_t *end)
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
int nal_length_size
Number of bytes used for H.264 NAL length, if the MP4 syntax is used (1, 2 or 4)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * priv_data
Format private data.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static const uint8_t * avc_mp4_find_startcode(const uint8_t *start, const uint8_t *end, int nal_length_size)
#define FF_RTP_FLAG_H264_MODE0
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
static void nal_send(AVFormatContext *s1, const uint8_t *buf, int size, int last)
void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size)