From 15e6e7ddd2443550e46ca15ac9e5f59ad493fef2 Mon Sep 17 00:00:00 2001 From: feos Date: Sat, 2 Nov 2019 17:39:54 +0300 Subject: [PATCH 1/2] figure out new segment on the fly right in FrameDump::Start() --- Source/Core/VideoCommon/FrameDump.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/FrameDump.cpp b/Source/Core/VideoCommon/FrameDump.cpp index 8aca110e1b..5d47abc263 100644 --- a/Source/Core/VideoCommon/FrameDump.cpp +++ b/Source/Core/VideoCommon/FrameDump.cpp @@ -84,9 +84,8 @@ bool FrameDump::Start(int w, int h) s_width = w; s_height = h; - - s_last_frame_is_valid = false; s_last_pts = 0; + s_last_frame_is_valid = s_file_index != 0; InitAVCodec(); bool success = CreateVideoFile(); From cb6a632c60e0a147635f574bcaa0d15a74b9df71 Mon Sep 17 00:00:00 2001 From: feos Date: Mon, 4 Nov 2019 21:17:01 +0300 Subject: [PATCH 2/2] fix missing frame when you start another dump without closing dolphin --- Source/Core/VideoCommon/FrameDump.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/VideoCommon/FrameDump.cpp b/Source/Core/VideoCommon/FrameDump.cpp index 5d47abc263..9f845b3899 100644 --- a/Source/Core/VideoCommon/FrameDump.cpp +++ b/Source/Core/VideoCommon/FrameDump.cpp @@ -392,6 +392,7 @@ void FrameDump::Stop() av_write_trailer(s_format_context); CloseVideoFile(); s_file_index = 0; + s_start_dumping = false; NOTICE_LOG(VIDEO, "Stopping frame dump"); OSD::AddMessage("Stopped dumping frames"); }