Have to check for lock on video keyframe as well

This commit is contained in:
Isaac Connor 2021-01-25 12:07:56 -05:00
parent baf39b0d4f
commit a0df09dcaa
1 changed files with 5 additions and 0 deletions

View File

@ -117,6 +117,11 @@ bool zm_packetqueue::queuePacket(ZMPacket* add_packet) {
if ( zm_packet->packet.stream_index == video_stream_id ) { if ( zm_packet->packet.stream_index == video_stream_id ) {
if ( zm_packet->keyframe ) { if ( zm_packet->keyframe ) {
Debug(1, "Have a video keyframe so breaking out"); Debug(1, "Have a video keyframe so breaking out");
if ( !zm_packet->trylock() ) {
Debug(1, "Have locked packet %d", zm_packet->image_index);
video_stream_packets = max_video_packet_count;
}
zm_packet->unlock();
break; break;
} }
video_stream_packets ++; video_stream_packets ++;