Bug 1273652 - Always reinitialize the receiver/jitterbuffer when reseting video decoding. r=pkerr, a=gchang
authorRandell Jesup <rjesup@jesup.org>
Tue, 12 Jul 2016 15:42:59 -0400
changeset 340119 876634f4b29930139f2456de6e2342d9b21e71a5
parent 340118 7cb293390a5f444a5bab478f9aadcf929baf88a0
child 340120 c8ddb24aabedb227a092eeb734618843226ef4d4
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspkerr, gchang
bugs1273652
milestone49.0a2
Bug 1273652 - Always reinitialize the receiver/jitterbuffer when reseting video decoding. r=pkerr, a=gchang
media/webrtc/trunk/webrtc/modules/video_coding/main/source/video_receiver.cc
--- a/media/webrtc/trunk/webrtc/modules/video_coding/main/source/video_receiver.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_coding/main/source/video_receiver.cc
@@ -509,20 +509,22 @@ int32_t VideoReceiver::Decode(const VCME
   return ret;
 }
 
 // Reset the decoder state
 int32_t VideoReceiver::ResetDecoder() {
   bool reset_key_request = false;
   {
     CriticalSectionScoped cs(_receiveCritSect);
+    _receiver.Initialize();
+    _timing.Reset();
+    reset_key_request = true;
     if (_decoder != NULL) {
-      _receiver.Initialize();
-      _timing.Reset();
-      reset_key_request = true;
+      //      _receiver.Initialize();
+      //      _timing.Reset();
       _decoder->Reset();
     }
   }
   if (reset_key_request) {
     CriticalSectionScoped cs(process_crit_sect_.get());
     _scheduleKeyRequest = false;
   }
   return VCM_OK;