From 8a289d37b03352dcc8062dbc5b3fdad66e8693eb Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Tue, 6 Aug 2013 12:00:57 -0400 Subject: [PATCH] Reset returned FrameData in returnFrame, this is the safest way to do it --- openbr/plugins/stream.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbr/plugins/stream.cpp b/openbr/plugins/stream.cpp index 5944216..7d3aa11 100644 --- a/openbr/plugins/stream.cpp +++ b/openbr/plugins/stream.cpp @@ -226,9 +226,6 @@ public: if (aFrame == NULL) return NULL; - aFrame->data.clear(); - aFrame->sequenceNumber = -1; - // Try to actually read a frame, if this returns false the data source is broken bool res = getNext(*aFrame); @@ -262,6 +259,8 @@ public: { int frameNumber = inputFrame->sequenceNumber; + inputFrame->data.clear(); + inputFrame->sequenceNumber = -1; allFrames.addItem(inputFrame); bool rval = false; @@ -1061,6 +1060,7 @@ public: FrameData * firstFrame = readStage->dataSource.tryGetFrame(last_frame); if (firstFrame == NULL) qFatal("Failed to read first frame of video"); + readStage->startThread(firstFrame); lock.unlock(); -- libgit2 0.21.4