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

Unified Diff: webrtc/modules/video_coding/jitter_buffer.h

Issue 2146883002: Avoid race in VideoReceiveStream shutdown (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: JitterBuffer not resetting frame buffers on Stop Created 4 years, 5 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
Index: webrtc/modules/video_coding/jitter_buffer.h
diff --git a/webrtc/modules/video_coding/jitter_buffer.h b/webrtc/modules/video_coding/jitter_buffer.h
index 35b32c960d3754397fe87985c5f5a7a8efefda45..62017dae7ff86c61ddd29f82ce1bc24b046c4118 100644
--- a/webrtc/modules/video_coding/jitter_buffer.h
+++ b/webrtc/modules/video_coding/jitter_buffer.h
@@ -261,8 +261,6 @@ class VCMJitterBuffer {
// Drops all packets in the NACK list up until |last_decoded_sequence_number|.
void DropPacketsFromNackList(uint16_t last_decoded_sequence_number);
- void ReleaseFrameIfNotDecoding(VCMFrameBuffer* frame);
-
// Gets an empty frame, creating a new frame if necessary (i.e. increases
// jitter buffer size).
VCMFrameBuffer* GetEmptyFrame() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
@@ -310,6 +308,10 @@ class VCMJitterBuffer {
void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+ // Reset frame buffer and return it to free_frames_.
+ void RecycleFrameBuffer(VCMFrameBuffer* frame)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+
Clock* clock_;
// If we are running (have started) or not.
bool running_;
@@ -334,8 +336,6 @@ class VCMJitterBuffer {
int64_t time_last_incoming_frame_count_;
unsigned int incoming_bit_count_;
unsigned int incoming_bit_rate_;
- // Number of frames in a row that have been too old.
- int num_consecutive_old_frames_;
// Number of packets in a row that have been too old.
int num_consecutive_old_packets_;
// Number of packets received.
« no previous file with comments | « no previous file | webrtc/modules/video_coding/jitter_buffer.cc » ('j') | webrtc/modules/video_coding/jitter_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698