Add a warning when there are more videoframes in the packetqueue than image_buffers
This commit is contained in:
parent
dae31d226b
commit
990c4b1b45
|
@ -867,6 +867,10 @@ int FfmpegCamera::CaptureAndRecord( Image &image, timeval recording, char* event
|
|||
if ( packet.stream_index == mVideoStreamId ) {
|
||||
if ( keyframe ) {
|
||||
Debug(3, "Clearing queue");
|
||||
if ( packetqueue->packet_count(mVideoStreamId) >= monitor->GetImageBufferCount() ) {
|
||||
Warning("ImageBufferCount is too small. Either increase it or decrease time between keyframes");
|
||||
}
|
||||
|
||||
packetqueue->clearQueue(monitor->GetPreEventCount(), mVideoStreamId);
|
||||
packetqueue->queuePacket(&packet);
|
||||
} else if ( packetqueue->size() ) {
|
||||
|
|
Loading…
Reference in New Issue