saveoitio: Add fix for to_json_file
The function to_json_file can delete it's SerializableObject if it doesn't have a Retainer associated with it. This fix adds said Retainer. Retainers clean them selves up when possibly_delete is called on their associated object.
This commit is contained in:
@@ -24,11 +24,14 @@
|
||||
#include <opentimelineio/externalReference.h>
|
||||
#include <opentimelineio/gap.h>
|
||||
#include <opentimelineio/serializableCollection.h>
|
||||
#include <opentimelineio/serializableObject.h>
|
||||
#include <opentimelineio/transition.h>
|
||||
|
||||
#include "node/block/transition/transition.h"
|
||||
#include "node/input/media/media.h"
|
||||
|
||||
#define OTIO opentimelineio::OPENTIMELINEIO_VERSION
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
SaveOTIOTask::SaveOTIOTask(ProjectPtr project) :
|
||||
@@ -94,6 +97,7 @@ bool SaveOTIOTask::Run()
|
||||
opentimelineio::v1_0::Timeline *SaveOTIOTask::SerializeTimeline(SequencePtr sequence)
|
||||
{
|
||||
auto otio_timeline = new opentimelineio::v1_0::Timeline(sequence->name().toStdString());
|
||||
OTIO::Timeline::Retainer<OTIO::Timeline>* time_retainer = new OTIO::Timeline::Retainer<OTIO::Timeline>(otio_timeline);
|
||||
|
||||
if (!SerializeTrackList(sequence->viewer_output()->track_list(Timeline::kTrackTypeVideo), otio_timeline)
|
||||
|| !SerializeTrackList(sequence->viewer_output()->track_list(Timeline::kTrackTypeAudio), otio_timeline)) {
|
||||
|
||||
Reference in New Issue
Block a user