commit 6d4c064f419fe58625921af303863d73a1b02f6b
parent c55246fb5b540bd6875da1c8460665bc2861e2c3
Author: Dan Baker <dbaker@mozilla.com>
Date: Mon, 27 Oct 2025 12:48:19 -0600
Bug 1995393 - Vendor libwebrtc from 3f16dcd95a
Upstream commit: https://webrtc.googlesource.com/src/+/3f16dcd95a615d1611c4f54ee948bb745fe0eb25
Delete mutable data() accessor in EncodedImageBufferInterface
This makes EncodedImageBufferInterface read-only as intended.
Bug: webrtc:42234570
Change-Id: Ia2c35e8a4b0ecdd4b655d2b038f304ef7b062453
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/406103
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45437}
Diffstat:
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor
@@ -1,4 +1,4 @@
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T18:45:59.485019+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T18:48:02.669091+00:00.
# base of lastest vendoring
-61fc8743a9
+3f16dcd95a
diff --git a/third_party/libwebrtc/api/video/encoded_image.h b/third_party/libwebrtc/api/video/encoded_image.h
@@ -43,13 +43,6 @@ class EncodedImageBufferInterface : public RefCountInterface {
using value_type = uint8_t;
virtual const uint8_t* data() const = 0;
- // TODO: bugs.webrtc.org/42234570 - Make interface essentially read-only,
- // delete this non-const data method when an implementation in chromium is
- // updated not to override it.
- virtual uint8_t* data() {
- return const_cast<uint8_t*>(
- static_cast<const EncodedImageBufferInterface*>(this)->data());
- }
virtual size_t size() const = 0;
const uint8_t* begin() const { return data(); }
@@ -66,7 +59,7 @@ class RTC_EXPORT EncodedImageBuffer : public EncodedImageBufferInterface {
static scoped_refptr<EncodedImageBuffer> Create(Buffer buffer);
const uint8_t* data() const override;
- uint8_t* data() override;
+ uint8_t* data();
size_t size() const override;
void Realloc(size_t t);