Add owned data buffer to EncodedImage
Bug: webrtc:9378 Change-Id: I6a66b9301cbadf1d6517bf7a96028099970a20a3 Reviewed-on: https://webrtc-review.googlesource.com/c/117964 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26585}
This commit is contained in:
@ -587,9 +587,9 @@ const webrtc::EncodedImage* VideoProcessor::BuildAndStoreSuperframe(
|
||||
copied_image.set_size(payload_size_bytes);
|
||||
|
||||
// Replace previous EncodedImage for this spatial layer.
|
||||
uint8_t* old_data = merged_encoded_frames_.at(spatial_idx).data();
|
||||
if (old_data) {
|
||||
delete[] old_data;
|
||||
uint8_t* old_buffer = merged_encoded_frames_.at(spatial_idx).buffer();
|
||||
if (old_buffer) {
|
||||
delete[] old_buffer;
|
||||
}
|
||||
merged_encoded_frames_.at(spatial_idx) = copied_image;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user