If the configured start bitrate is higher than the configures max
bitrate, cap the star rate accordingly.

BUG=2720
R=asapersson@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5327 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video_engine/vie_codec_impl.cc b/video_engine/vie_codec_impl.cc
index b46eb88..07aaf72 100644
--- a/video_engine/vie_codec_impl.cc
+++ b/video_engine/vie_codec_impl.cc
@@ -166,16 +166,16 @@
                                        video_codec_internal.height *
                                        video_codec_internal.maxFramerate)
                                        / 1000;
-    if (video_codec_internal.startBitrate > video_codec_internal.maxBitrate) {
-      // Don't limit the set start bitrate.
-      video_codec_internal.maxBitrate = video_codec_internal.startBitrate;
-    }
     WEBRTC_TRACE(kTraceInfo, kTraceVideo,
                  ViEId(shared_data_->instance_id(), video_channel),
                  "%s: New max bitrate set to %d kbps", __FUNCTION__,
                  video_codec_internal.maxBitrate);
   }
 
+  if (video_codec_internal.startBitrate > video_codec_internal.maxBitrate) {
+    video_codec_internal.startBitrate = video_codec_internal.maxBitrate;
+  }
+
   VideoCodec encoder;
   vie_encoder->GetEncoder(&encoder);