Skip to content
Snippets Groups Projects
Commit 650e3a39 authored by Laurent Claustre's avatar Laurent Claustre
Browse files

Merge branch 'fix_buffer' into 'master'

fix buffer bug : image n-16 was returned.

See merge request !10
parents 8e4f035c abde8ff1
No related branches found
No related tags found
1 merge request!10fix buffer bug : image n-16 was returned.
Pipeline #9829 passed
......@@ -86,19 +86,27 @@ void BufferCtrlObj::_newFrame(tPvFrame* aFrame)
}
++bufferPt->m_acq_frame_nb;
int next_frame_nb = bufferPt->m_acq_frame_nb + 1;
tPvFrame* next_frame = &(bufferPt->m_frame[next_frame_nb % 2]);
bool stopAcq = false;
if(!requested_nb_frames ||
bufferPt->m_acq_frame_nb < (requested_nb_frames - 1))
{
int buffer_nb, concat_frame_nb;
bufferPt->m_buffer_cb_mgr.acqFrameNb2BufferNb(bufferPt->m_acq_frame_nb,
bufferPt->m_buffer_cb_mgr.acqFrameNb2BufferNb(
next_frame_nb,
buffer_nb,
concat_frame_nb);
aFrame->ImageBuffer = (char*)bufferPt->m_buffer_cb_mgr.getBufferPtr(buffer_nb,
next_frame->ImageBuffer = (char*)bufferPt->m_buffer_cb_mgr.getBufferPtr(
buffer_nb,
concat_frame_nb);
bufferPt->m_exposing = true;
bufferPt->m_status = PvCaptureQueueFrame(bufferPt->m_handle,aFrame,_newFrame);
bufferPt->m_status = PvCaptureQueueFrame(bufferPt->m_handle,
next_frame,
_newFrame);
}
else
stopAcq = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment