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:
@ -253,8 +253,8 @@ int MultiplexEncoderAdapter::Release() {
|
||||
}
|
||||
}
|
||||
stashed_images_.clear();
|
||||
if (combined_image_.data()) {
|
||||
delete[] combined_image_.data();
|
||||
if (combined_image_.buffer()) {
|
||||
delete[] combined_image_.buffer();
|
||||
combined_image_.set_buffer(nullptr, 0);
|
||||
}
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
@ -302,8 +302,8 @@ EncodedImageCallback::Result MultiplexEncoderAdapter::OnEncodedImage(
|
||||
|
||||
// We have to send out those stashed frames, otherwise the delta frame
|
||||
// dependency chain is broken.
|
||||
if (combined_image_.data())
|
||||
delete[] combined_image_.data();
|
||||
if (combined_image_.buffer())
|
||||
delete[] combined_image_.buffer();
|
||||
combined_image_ =
|
||||
MultiplexEncodedImagePacker::PackAndRelease(iter->second);
|
||||
|
||||
|
Reference in New Issue
Block a user