Lines Matching defs:length
813 int length = bytestream2_get_bytes_left(gb);
816 if ((length % 3) != 0 || length > 256 * 3)
819 n = length / 3;
836 int length = bytestream2_get_bytes_left(gb);
850 if (length > 256 || !(s->hdr_state & PNG_PLTE))
853 for (i = 0; i < length; i++) {
858 if ((s->color_type == PNG_COLOR_TYPE_GRAY && length != 2) ||
859 (s->color_type == PNG_COLOR_TYPE_RGB && length != 6) ||
863 for (i = 0; i < length / 2; i++) {
1189 uint32_t tag, length;
1196 length = bytestream2_get_bytes_left(&s->gb);
1197 if (length <= 0) {
1204 if (CONFIG_APNG_DECODER && avctx->codec_id == AV_CODEC_ID_APNG && length == 0) {
1210 av_log(avctx, AV_LOG_ERROR, "%d bytes left\n", length);
1218 length = bytestream2_get_be32(&s->gb);
1219 if (length > 0x7fffffff || length + 8 > bytestream2_get_bytes_left(&s->gb)) {
1225 uint32_t crc_sig = AV_RB32(s->gb.buffer + length + 4);
1226 uint32_t crc_cal = ~av_crc(crc_tab, UINT32_MAX, s->gb.buffer, length + 4);
1235 bytestream2_skip(&s->gb, length + 8); /* tag */
1241 av_log(avctx, AV_LOG_DEBUG, "png: tag=%s length=%u\n",
1242 av_fourcc2str(tag), length);
1244 bytestream2_init(&gb_chunk, s->gb.buffer, length);
1245 bytestream2_skip(&s->gb, length + 4);