Chromium Code Reviews| Index: webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc |
| diff --git a/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc b/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc |
| index 8c798db66529b5131d63aaa218e8c6f419cac2e7..1bde7084548928c559aed658841254e2c3c4b4c8 100644 |
| --- a/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc |
| +++ b/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc |
| @@ -256,6 +256,9 @@ int VP9EncoderImpl::InitEncode(const VideoCodec* inst, |
| } |
| if (encoder_ == NULL) { |
| encoder_ = new vpx_codec_ctx_t; |
| + // Random start 16 bits is enough. |
| + picture_id_ = static_cast<uint16_t>(rand()) & 0x7FFF; // NOLINT |
| + tl0_pic_idx_ = static_cast<uint8_t>(rand()); // NOLINT |
|
stefan-webrtc
2016/11/08 10:41:34
Not clear to me why this change is done, and why i
philipel
2016/11/08 12:28:39
Done.
stefan-webrtc
2016/11/08 14:49:27
The problem is that if we're relying on this chang
philipel
2016/11/10 16:13:53
Fixed in RtpFrameReferenceFinder
|
| } |
| if (config_ == NULL) { |
| config_ = new vpx_codec_enc_cfg_t; |
| @@ -270,8 +273,6 @@ int VP9EncoderImpl::InitEncode(const VideoCodec* inst, |
| if (num_temporal_layers_ == 0) |
| num_temporal_layers_ = 1; |
| - // Random start 16 bits is enough. |
| - picture_id_ = static_cast<uint16_t>(rand()) & 0x7FFF; // NOLINT |
| // Allocate memory for encoded image |
| if (encoded_image_._buffer != NULL) { |
| delete[] encoded_image_._buffer; |
| @@ -366,8 +367,6 @@ int VP9EncoderImpl::InitEncode(const VideoCodec* inst, |
| return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; |
| } |
| - tl0_pic_idx_ = static_cast<uint8_t>(rand()); // NOLINT |
| - |
| return InitAndSetControlSettings(inst); |
| } |