Lines Matching refs:size
81 int64_t size;
92 size = bs_get_v(&bs);
93 if (size < 2)
95 if (size >= bs_end - bs + 2)
98 if (size < 11 || size > 28)
104 bs += size - 2;
125 static void mpc8_get_chunk_header(AVIOContext *pb, int *tag, int64_t *size)
130 *size = ffio_read_varlen(pb);
132 if (av_sat_add64(*size, pos) != (uint64_t)*size + pos) {
133 *size = -1;
135 *size += pos;
142 int64_t size, pos, ppos[2];
153 mpc8_get_chunk_header(s->pb, &tag, &size);
158 if (size > INT_MAX/10 || size<=0) {
159 av_log(s, AV_LOG_ERROR, "Bad seek table size\n");
162 if(!(buf = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE)))
164 ret = avio_read(s->pb, buf, size);
165 if (ret != size) {
170 memset(buf+size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
172 init_get_bits(&gb, buf, size * 8);
173 size = gb_get_v(&gb);
174 if(size > UINT_MAX/4 || size > c->samples/1152){
191 for(; i < size; i++){
208 static void mpc8_handle_chunk(AVFormatContext *s, int tag, int64_t chunk_pos, int64_t size)
217 if (pos > INT64_MAX - size || off < 0 || off > INT64_MAX - chunk_pos)
219 pos += size;
224 avio_skip(pb, size);
235 int64_t size, pos;
245 mpc8_get_chunk_header(pb, &tag, &size);
246 if (size < 0) {
252 mpc8_handle_chunk(s, tag, pos, size);
284 size -= avio_tell(pb) - pos;
285 if (size > 0)
286 avio_skip(pb, size);
301 int64_t pos, size;
310 mpc8_get_chunk_header(s->pb, &tag, &size);
311 if (size < 0 || size > INT_MAX)
314 if ((ret = av_get_packet(s->pb, pkt, size)) < 0)
322 mpc8_handle_chunk(s, tag, pos, size);