summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2016-10-15 19:06:01 +0200
committerdegasus <wickmarkus@web.de>2016-11-04 18:03:14 +0100
commit03d8efc270c5a522c2991d37e43f753b2ca906c3 (patch)
tree3f9993f48fbb4471bd09d5e87ce07369d6323c5a /Source/Core/VideoCommon
parent112e18a5d1f9b08188793c1062973763aa83d9f2 (diff)
AVIDump: Merge redundant variables.
They were always the same. We also don't scale at all.
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/AVIDump.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp
index adfbe022ad..e4fb4d7302 100644
--- a/Source/Core/VideoCommon/AVIDump.cpp
+++ b/Source/Core/VideoCommon/AVIDump.cpp
@@ -43,8 +43,6 @@ static u64 s_last_frame;
static bool s_last_frame_is_valid = false;
static bool s_start_dumping = false;
static u64 s_last_pts;
-static int s_current_width;
-static int s_current_height;
static int s_file_index = 0;
static void InitAVCodec()
@@ -63,8 +61,6 @@ bool AVIDump::Start(int w, int h)
s_width = w;
s_height = h;
- s_current_width = w;
- s_current_height = h;
s_last_frame_is_valid = false;
s_last_pts = 0;
@@ -171,8 +167,7 @@ void AVIDump::AddFrame(const u8* data, int width, int height, int stride, u64 ti
s_src_frame->width = s_width;
s_src_frame->height = s_height;
- // Convert image from {BGR24, RGBA} to desired pixel format, and scale to initial
- // width and height
+ // Convert image from {BGR24, RGBA} to desired pixel format
if ((s_sws_context =
sws_getCachedContext(s_sws_context, width, height, s_pix_fmt, s_width, s_height,
s_stream->codec->pix_fmt, SWS_BICUBIC, nullptr, nullptr, nullptr)))
@@ -293,13 +288,11 @@ void AVIDump::CheckResolution(int width, int height)
// (possibly width as well, but no examples known) to have a value of zero. This can occur as the
// VI is able to be set to a zero value for height/width to disable output. If this is the case,
// simply keep the last known resolution of the video for the added frame.
- if ((width != s_current_width || height != s_current_height) && (width > 0 && height > 0))
+ if ((width != s_width || height != s_height) && (width > 0 && height > 0))
{
int temp_file_index = s_file_index;
Stop();
s_file_index = temp_file_index + 1;
Start(width, height);
- s_current_width = width;
- s_current_height = height;
}
}