Merge "Stagefright: Fix unused variables, functions, values"
diff --git a/media/img_utils/include/img_utils/TiffEntryImpl.h b/media/img_utils/include/img_utils/TiffEntryImpl.h
index f5ccb5e..c73e231 100644
--- a/media/img_utils/include/img_utils/TiffEntryImpl.h
+++ b/media/img_utils/include/img_utils/TiffEntryImpl.h
@@ -147,7 +147,7 @@
 }
 
 template<typename T>
-status_t TiffEntryImpl<T>::writeData(uint32_t offset, EndianOutput* out) const {
+status_t TiffEntryImpl<T>::writeData(uint32_t /*offset*/, EndianOutput* out) const {
     status_t ret = OK;
 
     // Some tags have fixed-endian value output
diff --git a/media/img_utils/src/FileInput.cpp b/media/img_utils/src/FileInput.cpp
index 498e715..4c85a51 100644
--- a/media/img_utils/src/FileInput.cpp
+++ b/media/img_utils/src/FileInput.cpp
@@ -78,7 +78,7 @@
         ret = BAD_VALUE;
     }
     mOpen = false;
-    return OK;
+    return ret;
 }
 
 } /*namespace img_utils*/
diff --git a/media/img_utils/src/FileOutput.cpp b/media/img_utils/src/FileOutput.cpp
index ce763ff..0346762 100644
--- a/media/img_utils/src/FileOutput.cpp
+++ b/media/img_utils/src/FileOutput.cpp
@@ -72,7 +72,7 @@
         ret = BAD_VALUE;
     }
     mOpen = false;
-    return OK;
+    return ret;
 }
 
 } /*namespace img_utils*/
diff --git a/media/libcpustats/ThreadCpuUsage.cpp b/media/libcpustats/ThreadCpuUsage.cpp
index cfdcb51..7b5b661 100644
--- a/media/libcpustats/ThreadCpuUsage.cpp
+++ b/media/libcpustats/ThreadCpuUsage.cpp
@@ -74,7 +74,6 @@
 
 bool ThreadCpuUsage::sampleAndEnable(double& ns)
 {
-    bool ret;
     bool wasEverEnabled = mWasEverEnabled;
     if (enable()) {
         // already enabled, so add a new sample relative to previous
diff --git a/media/libstagefright/codecs/avc/common/src/deblock.cpp b/media/libstagefright/codecs/avc/common/src/deblock.cpp
index de2d2b6..5f8b693 100644
--- a/media/libstagefright/codecs/avc/common/src/deblock.cpp
+++ b/media/libstagefright/codecs/avc/common/src/deblock.cpp
@@ -1279,7 +1279,7 @@
     int  C0, c0, dif, AbsDelta, Strng, tmp, tmp1;
     int  L2 = 0, L1, L0, R0, R1, R2 = 0;
     uint8 *ptr, *ptr1;
-    register uint R_in, L_in;
+    uint R_in, L_in;
     uint R_out, L_out;
 
 
diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h
index 130593f..3e6cd0a 100644
--- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h
+++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h
@@ -26,8 +26,6 @@
 
 namespace android {
 
-struct MediaBuffer;
-
 struct SoftAVCEncoder : public MediaBufferObserver,
                         public SoftVideoEncoderOMXComponent {
     SoftAVCEncoder(
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
index 1f4b6fd..142969c 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
@@ -353,8 +353,8 @@
     }
 }
 
-void SoftMPEG4::updatePortDefinitions() {
-    SoftVideoDecoderOMXComponent::updatePortDefinitions();
+void SoftMPEG4::updatePortDefinitions(bool updateCrop) {
+    SoftVideoDecoderOMXComponent::updatePortDefinitions(updateCrop);
 
     /* We have to align our width and height - this should affect stride! */
     OMX_PARAM_PORTDEFINITIONTYPE *def = &editPortInfo(kOutputPortIndex)->mDef;
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h
index 8a06a00..31577e2 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h
+++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h
@@ -66,7 +66,7 @@
 
     status_t initDecoder();
 
-    virtual void updatePortDefinitions();
+    virtual void updatePortDefinitions(bool updateCrop = true);
     bool handlePortSettingsChange();
 
     DISALLOW_EVIL_CONSTRUCTORS(SoftMPEG4);
diff --git a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
index b0605b4..d706bb4 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
+++ b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
@@ -25,8 +25,6 @@
 
 namespace android {
 
-struct MediaBuffer;
-
 struct SoftMPEG4Encoder : public SoftVideoEncoderOMXComponent {
     SoftMPEG4Encoder(
             const char *name,