From 93b8dc054aa4e6b4f88a56525d0689092f9683cd Mon Sep 17 00:00:00 2001 From: Michel Promonet Date: Mon, 15 Jun 2015 23:22:44 +0200 Subject: [PATCH] fix output : store whar was read (before frame splitting and marker removing) --- src/V4l2DeviceSource.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/V4l2DeviceSource.cpp b/src/V4l2DeviceSource.cpp index 2f180e6..3f364fd 100644 --- a/src/V4l2DeviceSource.cpp +++ b/src/V4l2DeviceSource.cpp @@ -219,6 +219,10 @@ int V4L2DeviceSource::getNextFrame() m_in.notify(tv.tv_sec, frameSize); LOG(DEBUG) << "getNextFrame\ttimestamp:" << ref.tv_sec << "." << ref.tv_usec << "\tsize:" << frameSize <<"\tdiff:" << (diff.tv_sec*1000+diff.tv_usec/1000) << "ms"; processFrame(buffer,frameSize,ref); + if (m_outfd != -1) + { + write(m_outfd, buffer, frameSize); + } } return frameSize; } @@ -241,8 +245,6 @@ void V4L2DeviceSource::processFrame(char * frame, int frameSize, const timeval & queueFrame(buf,size,ref); LOG(DEBUG) << "queueFrame\ttimestamp:" << ref.tv_sec << "." << ref.tv_usec << "\tsize:" << size <<"\tdiff:" << (diff.tv_sec*1000+diff.tv_usec/1000) << "ms"; - if (m_outfd != -1) write(m_outfd, buf, size); - frameList.pop_front(); } }