Update test code to use EncodedImage::Allocate

Bug: webrtc:9378
Change-Id: I2ea63b097b0263b264fbbcca295365781fcae621
Reviewed-on: https://webrtc-review.googlesource.com/c/122780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26690}
This commit is contained in:
Niels Möller
2019-02-14 16:15:54 +01:00
committed by Commit Bot
parent fd965c008c
commit 663844d800
6 changed files with 30 additions and 43 deletions

View File

@ -41,7 +41,8 @@ class IvfFileWriterTest : public ::testing::Test {
int num_frames,
bool use_capture_tims_ms) {
EncodedImage frame;
frame.set_buffer(dummy_payload, sizeof(dummy_payload));
frame.Allocate(sizeof(dummy_payload));
memcpy(frame.data(), dummy_payload, sizeof(dummy_payload));
frame._encodedWidth = width;
frame._encodedHeight = height;
for (int i = 1; i <= num_frames; ++i) {