diff --git a/src/Main.cpp b/src/Main.cpp index bc39acc9..56707125 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -34,9 +34,12 @@ int main() t.AddClip(&c3); // Request frames - for (int x=0; x<330; x++) + for (int x=0; x<133; x++) t.GetFrame(x); + // Close timeline + t.Close(); + cout << "Successfully Finished Timeline DEMO" << endl; return 0; diff --git a/src/Timeline.cpp b/src/Timeline.cpp index 931eed55..e53c0589 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -70,7 +70,16 @@ void Timeline::SortClips() // Close the reader (and any resources it was consuming) void Timeline::Close() { + // Close all open clips + list::iterator clip_itr; + for (clip_itr=clips.begin(); clip_itr != clips.end(); ++clip_itr) + { + // Get clip object from the iterator + Clip *clip = (*clip_itr); + // Open or Close this clip, based on if it's intersecting or not + update_open_clips(clip, false); + } } // Open the reader (and start consuming resources)