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

Unified Diff: webrtc/voice_engine/coder.cc

Issue 2806933002: Fix invalid output buffer usage (Closed)
Patch Set: Rebased to master and correct the order of AUTHORs Created 3 years, 8 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/coder.cc
diff --git a/webrtc/voice_engine/coder.cc b/webrtc/voice_engine/coder.cc
index 552e5a58224ed326fe7303fecd40ec03f66a9eff..6337e103a14707bd2264cf5dff51e2c3fd70140e 100644
--- a/webrtc/voice_engine/coder.cc
+++ b/webrtc/voice_engine/coder.cc
@@ -95,10 +95,11 @@ int32_t AudioCoder::Encode(const AudioFrame& audio,
// For any codec with a frame size that is longer than 10 ms the encoded
// length in bytes should be zero until a a full frame has been encoded.
encoded_length_in_bytes_ = 0;
+ encoded_data_ = encoded_data;
if (acm_->Add10MsData((AudioFrame&)audio_frame) == -1) {
return -1;
}
- encoded_data_ = encoded_data;
+
*encoded_length_in_bytes = encoded_length_in_bytes_;
return 0;
}
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698