Lines Matching defs:buf_size
573 static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
592 if (buf_size > 8 && AV_RB32(buf) == 1 && AV_RB32(buf+5) > (unsigned)buf_size) {
594 }else if(buf_size > 3 && AV_RB32(buf) > 1 && AV_RB32(buf) <= (unsigned)buf_size)
598 ret = ff_h2645_packet_split(&h->pkt, buf, buf_size, avctx, h->is_avc, h->nal_length_size,
654 (ret = h->avctx->hwaccel->start_frame(h->avctx, buf, buf_size)) < 0)
794 return (ret < 0) ? ret : buf_size;
800 static int get_consumed_bytes(int pos, int buf_size)
804 if (pos + 10 > buf_size)
805 pos = buf_size; // oops ;)
875 static int is_avcc_extradata(const uint8_t *buf, int buf_size)
883 if(nalsize > buf_size - (p-buf) || (p[2] & 0x9F) != 7)
892 if(nalsize > buf_size - (p-buf) || (p[2] & 0x9F) != 8)
985 int buf_size = avpkt->size;
997 if (buf_size == 0)
1007 if (h->is_avc && buf_size >= 9 && buf[0]==1 && buf[2]==0 && (buf[4]&0xFC)==0xFC) {
1008 if (is_avcc_extradata(buf, buf_size))
1009 return ff_h264_decode_extradata(buf, buf_size,
1014 buf_index = decode_nal_units(h, buf, buf_size);
1019 av_assert0(buf_index <= buf_size);
1025 buf_size >= 4 && !memcmp("Q264", buf, 4))
1026 return buf_size;
1048 return get_consumed_bytes(buf_index, buf_size);