If doing encoding, we don't care about keyframe

This commit is contained in:
Isaac Connor 2021-02-21 20:24:36 -05:00
parent 5d826fd558
commit 7c042c7837
1 changed files with 3 additions and 1 deletions

View File

@ -506,7 +506,9 @@ void Event::AddFramesInternal(int n_frames, int start_frame, Image **images, str
void Event::AddPacket(ZMPacket *packet) {
have_video_keyframe = have_video_keyframe || ( ( packet->codec_type == AVMEDIA_TYPE_VIDEO ) && packet->keyframe );
have_video_keyframe = have_video_keyframe ||
( ( packet->codec_type == AVMEDIA_TYPE_VIDEO ) &&
( packet->keyframe || monitor->GetOptVideoWriter() == Monitor::ENCODE) );
Debug(2, "have_video_keyframe %d codec_type %d == video? %d packet keyframe %d",
have_video_keyframe, packet->codec_type, (packet->codec_type == AVMEDIA_TYPE_VIDEO), packet->keyframe);
ZM_DUMP_PACKET(packet->packet, "Adding to event");