From 7b1ca0e66d45bab1fcb2b44c2c4933783bb7edd6 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 10 Dec 2020 14:05:57 -0500 Subject: [PATCH] Use the new DecodingEnabled function --- src/zm_ffmpeg_camera.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 44ab5964d..ce3386d58 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -976,16 +976,7 @@ int FfmpegCamera::CaptureAndRecord( } } // end if keyframe or have_video_keyframe - if ( - ( monitor->GetFunction() == Monitor::RECORD or monitor->GetFunction() == Monitor::NODECT ) - and - ( monitor->GetOptSaveJPEGs() == 0 ) - and - ( monitor->GetOptVideoWriter() == Monitor::H264PASSTHROUGH ) - ) { - // In this specific case we don't need to do the decode. - Debug(1, "Not decoding"); - } else { + if ( monitor->DecodingEnabled() ) { ret = zm_send_packet_receive_frame(mVideoCodecContext, mRawFrame, packet); if ( ret < 0 ) { if ( AVERROR(EAGAIN) != ret ) {