VP8: Avoid copying the codec struct on Reset().
BUG= Review URL: https://webrtc-codereview.appspot.com/1319013 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3887 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -149,7 +149,9 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
|
|||||||
}
|
}
|
||||||
timestamp_ = 0;
|
timestamp_ = 0;
|
||||||
|
|
||||||
codec_ = *inst;
|
if (&codec_ != inst) {
|
||||||
|
codec_ = *inst;
|
||||||
|
}
|
||||||
|
|
||||||
int num_temporal_layers = inst->codecSpecific.VP8.numberOfTemporalLayers > 1 ?
|
int num_temporal_layers = inst->codecSpecific.VP8.numberOfTemporalLayers > 1 ?
|
||||||
inst->codecSpecific.VP8.numberOfTemporalLayers : 1;
|
inst->codecSpecific.VP8.numberOfTemporalLayers : 1;
|
||||||
@@ -562,8 +564,11 @@ int VP8DecoderImpl::InitDecode(const VideoCodec* inst, int number_of_cores) {
|
|||||||
vpx_codec_control(decoder_, VP8_SET_POSTPROC, &ppcfg);
|
vpx_codec_control(decoder_, VP8_SET_POSTPROC, &ppcfg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Save VideoCodec instance for later; mainly for duplicating the decoder.
|
if (&codec_ != inst) {
|
||||||
codec_ = *inst;
|
// Save VideoCodec instance for later; mainly for duplicating the decoder.
|
||||||
|
codec_ = *inst;
|
||||||
|
}
|
||||||
|
|
||||||
propagation_cnt_ = -1;
|
propagation_cnt_ = -1;
|
||||||
latest_keyframe_complete_ = false;
|
latest_keyframe_complete_ = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user