Tracking: Fix one frame memory leak when tracking last frame
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 25 Mar 2015 08:20:37 +0000 (13:20 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 25 Mar 2015 08:20:37 +0000 (13:20 +0500)
extern/libmv/libmv/autotrack/autotrack.cc

index 96a0ef64a504a37cdfe14ab9a1b7ebd3d1c2f174..4c7bdf1fde80671522865eb5fcc8ecef67fe4736 100644 (file)
@@ -154,6 +154,7 @@ bool AutoTrack::TrackMarker(Marker* tracked_marker,
                                                      frame_accessor_,
                                                      &tracked_image);
   if (!tracked_key) {
+    frame_accessor_->ReleaseImage(reference_key);
     LG << "Couldn't get frame for tracked marker: " << tracked_marker;
     return false;
   }