Don't both updating analysis fps unless we are doing motion detection
This commit is contained in:
parent
9beaf613bf
commit
832eabbd79
|
@ -2267,6 +2267,7 @@ bool Monitor::Analyse() {
|
|||
// Only do these if it's a video packet.
|
||||
shared_data->last_read_index = snap->image_index;
|
||||
analysis_image_count++;
|
||||
if ( function == MODECT or function == MOCORD )
|
||||
UpdateAnalysisFPS();
|
||||
}
|
||||
shared_data->last_read_time = time(nullptr);
|
||||
|
@ -2549,10 +2550,12 @@ int Monitor::Capture() {
|
|||
// avcodec strips out important nals that describe the stream and
|
||||
// stick them in extradata. Need to send them along with keyframes
|
||||
AVStream *stream = camera->get_VideoStream();
|
||||
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
|
||||
video_fifo->write(
|
||||
static_cast<unsigned char *>(stream->codecpar->extradata),
|
||||
stream->codecpar->extradata_size,
|
||||
packet->pts);
|
||||
#endif
|
||||
}
|
||||
video_fifo->writePacket(*packet);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue