diff options
| author | shuffle2 <godisgovernment@gmail.com> | 2016-10-03 18:49:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-03 18:49:44 -0700 |
| commit | 4573cc89fa65a867f991c1e592ad47382f1ee0a5 (patch) | |
| tree | e9a2eee0b5d6af1c9af6cda0d571dbead7ae2fd9 /Source/Core/VideoCommon/AVIDump.cpp | |
| parent | 20ebf03804de400d57ddd4337bbafd8a3cd48ae4 (diff) | |
| parent | 55478af832a8efa3f5125e140d2460a1ff6b18a7 (diff) | |
Merge pull request #4285 from RisingFog/its_a_curse_to_recurse
Fix frame dump crash when resolution changes
Diffstat (limited to 'Source/Core/VideoCommon/AVIDump.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/AVIDump.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp index cb38026f7d..8c6c8d6a1b 100644 --- a/Source/Core/VideoCommon/AVIDump.cpp +++ b/Source/Core/VideoCommon/AVIDump.cpp @@ -183,10 +183,14 @@ static void PreparePacket(AVPacket* pkt) void AVIDump::AddFrame(const u8* data, int width, int height) { - // Store current frame data in case frame dumping stops before next frame update + // Store current frame data in case frame dumping stops before next frame update, + // but make sure that you don't store the last stored frame and check the resolution upon + // closing the file or else you store recusion, and dolphins don't like recursion. if (!s_stop_dumping) + { StoreFrameData(data, width, height); - CheckResolution(width, height); + CheckResolution(width, height); + } s_src_frame->data[0] = const_cast<u8*>(data); s_src_frame->linesize[0] = width * s_bytes_per_pixel; s_src_frame->format = s_pix_fmt; |
