+ if (num_vectors > 256) {
+ av_log(ctx->avctx, AV_LOG_ERROR,
+ "Read invalid number of motion vectors %d\n", num_vectors);
+ return AVERROR_INVALIDDATA;
+ }
+ if (num_vectors * 2 >= data_size)
+ return AVERROR_INVALIDDATA;
+
+ ctx->num_vectors = num_vectors;