With ACM2 and NetEq4, VoE fuzz test very often fails.
With ACM2 and NetEq4, VoE fuzz test very often fails.

As far as I observe, there are several reasons for this:
1. webrtc/modules/audio_coding/neteq4/neteq_impl.cc : 870
     assert(new_codec_);
   This is related to webrtc/modules/audio_coding/neteq4/decision_logic_normal.cc : 81
     kUndefined can happen without new_codec_ being set
2. webrtc/modules/audio_coding/neteq4/neteq_impl.cc : 745
   assert(sync_buffer_->FutureLength() >= expand_->overlap_length());
3. some other assert triggered.

The above happens not very often and goes away with no assertion.

3. (most common, this CL addresses this)
   webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc : 201
     payload_data_length = payload_length - rtp_header->header.paddingLength;
   There are situations that
     payload_length < rtp_header->header.paddingLength;
   OLD ACM + NetEq3 can handle this:
     a) webrtc/modules/audio_coding/main/source/acm_neteq.cc : 477
          int16_t payload_length = static_cast<int16_t>(length_payload);
        payload_length becomes negative in this situation
     b) webrtc/modules/audio_coding/neteq/recin.c
        WebRtcNetEQ_RecInInternal() handles negative payload length

I do not want to touch VoE, so I tried to let ACM2 and NetEq4 handle negative payload length.

This CL does not follow the exact way of OLD ACM + NetEq3. I stopped negative payload length at ACM and did not allow it go to NetEq4.

To try this, apply my uploaded patch : https://webrtc-codereview.appspot.com/2281004/

Let me know if you see better solutions.

R=henrik.lundin@webrtc.org, stefan@webrtc.org

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

git-svn-id: 03ae4fbe531b1eefc9d815f31e49022782c42458@4860 4adac7df-926f-26a2-2b94-8c16560cd09d

android-ia/platform_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,Omegaphora/external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,MIPS/external-chromium_org-third_party-webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,Omegaphora/external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc