OSDN Git Service

Fix a number of warnings in stagefright code.
authorAndreas Huber <andih@google.com>
Thu, 4 Apr 2013 17:42:23 +0000 (10:42 -0700)
committerAndreas Huber <andih@google.com>
Thu, 4 Apr 2013 17:42:23 +0000 (10:42 -0700)
Change-Id: If3edd00d991851797aeccdfe795a4a405e3a2ea3

media/libstagefright/codecs/aacenc/SoftAACEncoder2.cpp
media/libstagefright/codecs/amrnb/enc/SoftAMRNBEncoder.cpp
media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp

index 7719435..5749733 100644 (file)
@@ -481,7 +481,7 @@ void SoftAACEncoder2::onQueueFilled(OMX_U32 portIndex) {
 
         void* inBuffer[]        = { (unsigned char *)mInputFrame };
         INT   inBufferIds[]     = { IN_AUDIO_DATA };
-        INT   inBufferSize[]    = { numBytesPerInputFrame };
+        INT   inBufferSize[]    = { (INT)numBytesPerInputFrame };
         INT   inBufferElSize[]  = { sizeof(int16_t) };
 
         AACENC_BufDesc inBufDesc;
index 07f8b4f..50b739c 100644 (file)
@@ -257,7 +257,7 @@ OMX_ERRORTYPE SoftAMRNBEncoder::internalSetParameter(
             }
 
             if (pcmParams->nChannels != 1
-                    || pcmParams->nSamplingRate != kSampleRate) {
+                    || pcmParams->nSamplingRate != (OMX_U32)kSampleRate) {
                 return OMX_ErrorUndefined;
             }
 
index cc38dc3..e25637a 100644 (file)
@@ -655,7 +655,8 @@ void SoftVPXEncoder::onQueueFilled(OMX_U32 portIndex) {
         vpx_codec_iter_t encoded_packet_iterator = NULL;
         const vpx_codec_cx_pkt_t* encoded_packet;
 
-        while (encoded_packet = vpx_codec_get_cx_data(mCodecContext, &encoded_packet_iterator)) {
+        while ((encoded_packet = vpx_codec_get_cx_data(
+                        mCodecContext, &encoded_packet_iterator))) {
             if (encoded_packet->kind == VPX_CODEC_CX_FRAME_PKT) {
                 outputBufferHeader->nTimeStamp = encoded_packet->data.frame.pts;
                 outputBufferHeader->nFlags = 0;