Look at stream index instead of image_index when finding first keyframe in packetqueue

This commit is contained in:
Isaac Connor 2020-12-27 12:32:46 -05:00
parent e58c06e60f
commit 9be7547c8b
1 changed files with 2 additions and 3 deletions

View File

@ -477,10 +477,9 @@ std::list<ZMPacket *>::iterator zm_packetqueue::get_event_start_packet_it(
Debug(1, "Checking for keyframe begin %p", *(pktQueue.begin())); Debug(1, "Checking for keyframe begin %p", *(pktQueue.begin()));
// snapshot it might already point to the beginning // snapshot it might already point to the beginning
while ( ( it != pktQueue.begin() ) and pre_event_count ) { while ( ( it != pktQueue.begin() ) and pre_event_count ) {
Debug(1, "Previous packet pre %d index %d keyframe %d", pre_event_count, (*it)->image_index, (*it)->keyframe); Debug(1, "Previous packet pre %d index %d keyframe %d", pre_event_count, (*it)->packet.stream_index, (*it)->keyframe);
dumpPacket( &((*it)->packet ) ); dumpPacket( &((*it)->packet ) );
// Is video, maybe should compare stream_id instead if ( (*it)->packet.stream_index != video_stream_id ) {
if ( (*it)->image_index != -1 ) {
pre_event_count --; pre_event_count --;
} }
it--; it--;