From 268e364cfd737df083536aff980604279dcf66ee Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 9 Oct 2020 10:21:00 -0400 Subject: [PATCH] handle the paused case --- src/zm_ffmpeg_input.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/zm_ffmpeg_input.cpp b/src/zm_ffmpeg_input.cpp index c07549522..613131d12 100644 --- a/src/zm_ffmpeg_input.cpp +++ b/src/zm_ffmpeg_input.cpp @@ -206,7 +206,7 @@ AVFrame *FFmpeg_Input::get_frame(int stream_id, double at) { if ( (last_seek_request >= 0) && - (last_seek_request > seek_target ) + (last_seek_request > seek_target) && (frame->pts > seek_target) ) { @@ -221,6 +221,9 @@ AVFrame *FFmpeg_Input::get_frame(int stream_id, double at) { // Have to grab a frame to update our current frame to know where we are get_frame(stream_id); zm_dump_frame(frame, "frame->pts > seek_target, got"); + } else if ( last_seek_request == seek_target ) { + // paused case, sending keepalives + return frame; } // end if frame->pts > seek_target last_seek_request = seek_target;