[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44182] trunk/blender: Camera tracking: fixed issue when track used for rotation stabilization points to a freed memory after re-tracking this track .

Sergey Sharybin sergey.vfx at gmail.com
Fri Feb 17 09:20:22 CET 2012


Revision: 44182
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44182
Author:   nazgul
Date:     2012-02-17 08:20:21 +0000 (Fri, 17 Feb 2012)
Log Message:
-----------
Camera tracking: fixed issue when track used for rotation stabilization points to a freed memory after re-tracking this track.

--
svn merge -r44148:44149 ^/branches/soc-2011-tomato

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44148

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/tracking.c

Property Changed:
----------------
    trunk/blender/
    trunk/blender/source/blender/editors/space_outliner/


Property changes on: trunk/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44148
   + /branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149

Modified: trunk/blender/source/blender/blenkernel/intern/tracking.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/tracking.c	2012-02-17 08:19:14 UTC (rev 44181)
+++ trunk/blender/source/blender/blenkernel/intern/tracking.c	2012-02-17 08:20:21 UTC (rev 44182)
@@ -726,6 +726,7 @@
 {
 	MovieTrackingTrack *track;
 	MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking);
+	MovieTrackingTrack *rot_track= tracking->stabilization.rot_track;
 	ListBase tracks= {NULL, NULL}, new_tracks= {NULL, NULL};
 	ListBase *old_tracks;
 	int a;
@@ -747,7 +748,7 @@
 	   this is needed to keep names in unique state and it's faster to change names
 	   of currently operating tracks (if needed) */
 	for(a= 0; a<map->num_tracks; a++) {
-		int replace_sel= 0;
+		int replace_sel= 0, replace_rot= 0;
 		MovieTrackingTrack *new_track, *old;
 
 		track= &map->tracks[a];
@@ -766,8 +767,10 @@
 
 			/* original track was found, re-use flags and remove this track */
 			if(cur) {
-				if(act_track)
+				if(cur==act_track)
 					replace_sel= 1;
+				if(cur==rot_track)
+					replace_rot= 1;
 
 				track->flag= cur->flag;
 				track->pat_flag= cur->pat_flag;
@@ -786,6 +789,9 @@
 		if(replace_sel)		/* update current selection in clip */
 			tracking->act_track= new_track;
 
+		if(replace_rot)		/* update track used for rotation stabilization */
+			tracking->stabilization.rot_track= new_track;
+
 		BLI_addtail(&tracks, new_track);
 	}
 


Property changes on: trunk/blender/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44148
   + /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149




More information about the Bf-blender-cvs mailing list