From dba83c1cb1bef03bc5d1760c2639d06ff71c0fa7 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Wed, 8 Oct 2014 11:37:06 -0700 Subject: libstagefright: compile errors Change-Id: I752d7d73f9c4939160a1ccaefc44ce1f8ffd9982 --- media/libstagefright/CameraSource.cpp | 1 + media/libstagefright/MPEG4Writer.cpp | 7 ++++++- media/libstagefright/OMXCodec.cpp | 1 + media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp | 1 + media/libstagefright/codecs/on2/dec/SoftVPX.cpp | 1 + 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index 2b50763..716a699 100644 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -130,6 +130,7 @@ static int32_t getColorFormat(const char* colorFormat) { "CameraSource::getColorFormat", colorFormat); CHECK(!"Unknown color format"); + return -1; } CameraSource *CameraSource::Create(const String16 &clientName) { diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp index 4b8440b..9f20b1d 100644 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -41,8 +41,13 @@ #include "include/ESDS.h" + +#ifndef __predict_false +#define __predict_false(exp) __builtin_expect((exp) != 0, 0) +#endif + #define WARN_UNLESS(condition, message, ...) \ -( (CONDITION(condition)) ? false : ({ \ +( (__predict_false(condition)) ? false : ({ \ ALOGW("Condition %s failed " message, #condition, ##__VA_ARGS__); \ true; \ })) diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index a8806c8..288e07a 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -817,6 +817,7 @@ static size_t getFrameSize( CHECK(!"Should not be here. Unsupported color format."); break; } + return 0; } status_t OMXCodec::findTargetColorFormat( diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index 1f4b6fd..e399984 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -382,5 +382,6 @@ android::SoftOMXComponent *createSoftOMXComponent( } else { CHECK(!"Unknown component"); } + return NULL; } diff --git a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp index 828577a..87d6961 100644 --- a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp +++ b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp @@ -189,4 +189,5 @@ android::SoftOMXComponent *createSoftOMXComponent( } else { CHECK(!"Unknown component"); } + return NULL; } -- cgit v1.1