ATLFlight/snap_cam_manager

pure virtual method called

Opened this issue · 1 comments

I've noticed that there is a non-deterministic situation where the remaining unread frames are (presumably) already destructed when stopping the camera manager. The following line throws the error "pure virtual method called"

frame_queue_[ii].frame_->releaseRef();

Are the frames destructed when the listener is removed in the Terminate() method? Perhaps they are destructed when preview is stopped in the Stop() method? Is it necessary to release the references at all?

I'll follow up with a bit more that I've discovered. It seems as though the call to stopPreview() is the call that is freeing the frames

camera_ptr_->stopPreview();