Fix memory leak in classification example
authorYuan Zhao <yuanzhao@ti.com>
Tue, 11 Dec 2018 14:59:22 +0000 (08:59 -0600)
committerYuan Zhao <yuanzhao@ti.com>
Tue, 11 Dec 2018 14:59:22 +0000 (08:59 -0600)
- MCT-1101

examples/classification/main.cpp

index b907cd537a47b39aa58d27681dd4529f28422de8..22316063f8300be3475dedad51265d6581e9be30 100644 (file)
@@ -504,8 +504,7 @@ bool ReadFrame(ExecutionObjectPipeline* eop, const Configuration& c,
     } else {
         if(live_input == -1) {
             //Rewind!
-            cap.release();
-            cap.open(std::string(video_clip));
+            cap.set(CAP_PROP_POS_FRAMES, 0);
         }
     }