sigh. Move the snap unlock further down protecting another use of snap. Use a video test instead of image count to determine videoness of the snap
This commit is contained in:
parent
bd6566a819
commit
d3e91da514
|
@ -2305,15 +2305,15 @@ bool Monitor::Analyse() {
|
|||
}
|
||||
|
||||
packetqueue.clearPackets(snap);
|
||||
packetqueue.unlock(packet_lock);
|
||||
|
||||
if ( snap->image_index > 0 ) {
|
||||
if (snap->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
// 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();
|
||||
}
|
||||
packetqueue.unlock(packet_lock);
|
||||
shared_data->last_read_time = time(nullptr);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue