Delete EncodedImage methods buffer(), set_buffer() and mutable_data()

Bug: webrtc:9378
Change-Id: Iab21fe537f03a5cd130d8435cd94520952e693a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168494
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31164}
This commit is contained in:
Niels Möller
2020-05-04 13:47:28 +02:00
committed by Commit Bot
parent c1aaf4cb38
commit 49f574b3b3
3 changed files with 5 additions and 17 deletions

View File

@ -260,7 +260,9 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image,
AVPacket packet;
av_init_packet(&packet);
packet.data = input_image.mutable_data();
// packet.data has a non-const type, but isn't modified by
// avcodec_send_packet.
packet.data = const_cast<uint8_t*>(input_image.data());
if (input_image.size() >
static_cast<size_t>(std::numeric_limits<int>::max())) {
ReportError();