Bug 1073003 - Fix -Wsign-compare warnings. r=ehsan
authorBotond Ballo <botond@mozilla.com>
Wed, 17 Dec 2014 16:50:32 -0500
changeset 248381 b23df71e9c37e0349c5a4e2b9a7448cb87892174
parent 248380 4d942e4e68f4f584193d1860e91f7b61bc843062
child 248382 a7972d1adc997926e4c836df537dcec6a06b07d0
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1073003
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1073003 - Fix -Wsign-compare warnings. r=ehsan
media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
--- a/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
@@ -842,18 +842,18 @@ WebrtcOMXH264VideoEncoder::Encode(const 
   MOZ_ASSERT(mOMX != nullptr);
   if (mOMX == nullptr) {
     return WEBRTC_VIDEO_CODEC_ERROR;
   }
 
   // Have to reconfigure for resolution or framerate changes :-(
   // ~220ms initial configure on 8x10, 50-100ms for re-configure it appears
   // XXX drop frames while this is happening?
-  if (aInputImage.width() != mWidth ||
-      aInputImage.height() != mHeight) {
+  if (aInputImage.width() < 0 || (uint32_t)aInputImage.width() != mWidth ||
+      aInputImage.height() < 0 || (uint32_t)aInputImage.height() != mHeight) {
     mWidth = aInputImage.width();
     mHeight = aInputImage.height();
     mOMXReconfigure = true;
   }
 
   if (!mOMXConfigured || mOMXReconfigure) {
     if (mOMXConfigured) {
       CODEC_LOGD("WebrtcOMXH264VideoEncoder:%p reconfiguring encoder %dx%d @ %u fps",