Fixed implicit-int-conversion bugs.

BUG=
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1776004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4313 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2013-07-09 14:04:46 +00:00
parent cab716cc7d
commit f3f1358360
2 changed files with 22 additions and 12 deletions

View File

@ -33,7 +33,8 @@ YuvFileFrameGenerator::YuvFileFrameGenerator(FILE* file,
size_t height,
Clock* clock)
: FrameGenerator(width, height, clock), file_(file) {
frame_size_ = CalcBufferSize(kI420, width_, height_);
frame_size_ = CalcBufferSize(
kI420, static_cast<int>(width_), static_cast<int>(height_));
frame_buffer_ = new uint8_t[frame_size_];
}
@ -49,8 +50,15 @@ void YuvFileFrameGenerator::GenerateNextFrame() {
return;
}
ConvertToI420(kI420, frame_buffer_, 0, 0, width_, height_, frame_size_,
kRotateNone, &frame_);
ConvertToI420(kI420,
frame_buffer_,
0,
0,
static_cast<int>(width_),
static_cast<int>(height_),
0,
kRotateNone,
&frame_);
}
} // namespace test
} // namespace webrtc

View File

@ -39,9 +39,10 @@ struct FullStackTestParams {
const char* test_label;
struct {
const char* name;
size_t width, height, fps;
size_t width, height;
int fps;
} clip;
size_t bitrate;
unsigned int bitrate;
double avg_psnr_threshold;
double avg_ssim_threshold;
};
@ -274,13 +275,14 @@ TEST_P(FullStackTest, NoPacketLoss) {
newapi::VideoEngine::Create(newapi::VideoEngineConfig()));
test::DirectTransport transport(NULL);
VideoAnalyzer analyzer(NULL,
&transport,
loopback_video.get(),
params.test_label,
params.avg_psnr_threshold,
params.avg_ssim_threshold,
FLAGS_seconds * params.clip.fps);
VideoAnalyzer analyzer(
NULL,
&transport,
loopback_video.get(),
params.test_label,
params.avg_psnr_threshold,
params.avg_ssim_threshold,
static_cast<uint64_t>(FLAGS_seconds * params.clip.fps));
scoped_ptr<newapi::VideoCall> call(video_engine->CreateCall(&analyzer));
analyzer.receiver_ = call->Receiver();