Issue 1847, memcopy is wrong and unnecessary, it is sufficient to store the pointer before clearing the instance, and write back the pointer.

bug=issue1847

R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1585006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4178 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/neteq/dsp.c b/webrtc/modules/audio_coding/neteq/dsp.c
index 4153d06..ea2fa87 100644
--- a/webrtc/modules/audio_coding/neteq/dsp.c
+++ b/webrtc/modules/audio_coding/neteq/dsp.c
@@ -200,17 +200,12 @@
     int16_t saveMsPerCall = inst->millisecondsPerCall;
     enum BGNMode saveBgnMode = inst->BGNInst.bgnMode;
 #ifdef NETEQ_STEREO
-    MasterSlaveInfo saveMSinfo;
+    MasterSlaveInfo* saveMSinfo = inst->msInfo;
 #endif
 
     /* copy contents of statInst to avoid clearing */WEBRTC_SPL_MEMCPY_W16(&saveStats, &(inst->statInst),
         sizeof(DSPStats_t)/sizeof(int16_t));
 
-#ifdef NETEQ_STEREO
-    /* copy contents of msInfo to avoid clearing */WEBRTC_SPL_MEMCPY_W16(&saveMSinfo, &(inst->msInfo),
-        sizeof(MasterSlaveInfo)/sizeof(int16_t));
-#endif
-
     /* check that the sample rate is valid */
     if ((fs != 8000)
 #ifdef NETEQ_WIDEBAND
@@ -292,8 +287,8 @@
         sizeof(DSPStats_t)/sizeof(int16_t));
 
 #ifdef NETEQ_STEREO
-    /* Recreate MSinfo */WEBRTC_SPL_MEMCPY_W16(&(inst->msInfo), &saveMSinfo,
-        sizeof(MasterSlaveInfo)/sizeof(int16_t));
+    /* Write back the pointer. */
+    inst->msInfo = saveMSinfo;
 #endif
 
 #ifdef NETEQ_CNG_CODEC