Prevent encoding frames with wrong resolution.

This is a speculative fix for a crash that should be able to happen if a
codec is reconfigured while a frame is leaving the
VideoProcessingModule, causing a mismatch between configured codec and
input frame size.

BUG=
R=magjed@webrtc.org
TBR=mflodman@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8615}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8615 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2015-03-05 13:57:37 +00:00
parent 03054486f5
commit 67a9e40286
4 changed files with 20 additions and 1 deletions

View File

@ -640,6 +640,10 @@ bool VCMCodecDataBase::SupportsRenderScheduling() const {
return render_timing;
}
bool VCMCodecDataBase::MatchesCurrentResolution(int width, int height) const {
return send_codec_.width == width && send_codec_.height == height;
}
VCMGenericDecoder* VCMCodecDataBase::CreateAndInitDecoder(
uint8_t payload_type,
VideoCodec* new_codec,