Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(393)

Unified Diff: webrtc/modules/video_coding/frame_buffer.cc

Issue 1602523004: Added EncodedImage::GetBufferPaddingBytes. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Constant inside EncodedImage instead Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/encoded_frame.cc ('k') | webrtc/video_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/frame_buffer.cc
diff --git a/webrtc/modules/video_coding/frame_buffer.cc b/webrtc/modules/video_coding/frame_buffer.cc
index b6ddeda4e7c69a6a0694a8a243d1fce457125afd..11db7853bfc08d5debb7dcb3a67f035e8ac8e57a 100644
--- a/webrtc/modules/video_coding/frame_buffer.cc
+++ b/webrtc/modules/video_coding/frame_buffer.cc
@@ -105,7 +105,8 @@ VCMFrameBufferEnum VCMFrameBuffer::InsertPacket(
uint32_t requiredSizeBytes =
Length() + packet.sizeBytes +
- (packet.insertStartCode ? kH264StartCodeLengthBytes : 0);
+ (packet.insertStartCode ? kH264StartCodeLengthBytes : 0) +
+ EncodedImage::GetBufferPaddingBytes(packet.codec);
if (requiredSizeBytes >= _size) {
const uint8_t* prevBuffer = _buffer;
const uint32_t increments =
« no previous file with comments | « webrtc/modules/video_coding/encoded_frame.cc ('k') | webrtc/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698