From 0e1d52500d49cf6c25944282509990f0060cebdf Mon Sep 17 00:00:00 2001
From: Alexey <AlexeyAB@users.noreply.github.com>
Date: Wed, 27 Jun 2018 22:41:52 +0000
Subject: [PATCH] Merge pull request #1111 from tinohager/master

---
 build/darknet/YoloWrapper.cs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/build/darknet/YoloWrapper.cs b/build/darknet/YoloWrapper.cs
index ade0059..14bf56d 100644
--- a/build/darknet/YoloWrapper.cs
+++ b/build/darknet/YoloWrapper.cs
@@ -6,6 +6,7 @@
     public class YoloWrapper : IDisposable
     {
         private const string YoloLibraryName = "yolo_cpp_dll.dll";
+        private const int MaxObjects = 1000;
 
         [DllImport(YoloLibraryName, EntryPoint = "init")]
         public static extern int InitializeYolo(string configurationFilename, string weightsFilename, int gpu);
@@ -29,10 +30,10 @@
             public UInt32 frames_counter;
         };
 
-        [StructLayout(LayoutKind.Sequential, Size = 10)]
+        [StructLayout(LayoutKind.Sequential)]
         public struct BboxContainer
         {
-            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
+            [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaxObjects)]
             public bbox_t[] candidates;
         }
 

--
Gitblit v1.10.0