/* Store a pointer to this fragment and return. We haven't
* received the complete frame yet, so we will wait with decoding.
*/
- ctx->fragments.ptrs[ctx->fragments.count] = data;
- ctx->fragments.sizes[ctx->fragments.count] = data_sz;
- ctx->fragments.count++;
- if (ctx->fragments.count > (1 << EIGHT_PARTITION) + 1) {
+ if (ctx->fragments.count >= MAX_PARTITIONS) {
ctx->fragments.count = 0;
*res = VPX_CODEC_INVALID_PARAM;
return -1;
}
+ ctx->fragments.ptrs[ctx->fragments.count] = data;
+ ctx->fragments.sizes[ctx->fragments.count] = data_sz;
+ ctx->fragments.count++;
return 0;
}