diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/CameraSource.cpp | 3 | ||||
-rw-r--r-- | media/libstagefright/MPEG4Writer.cpp | 10 | ||||
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 5 |
3 files changed, 11 insertions, 7 deletions
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index 3e31d61..89cb135 100644 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -93,6 +93,9 @@ static int32_t getColorFormat(const char* colorFormat) { return OMX_COLOR_Format16bitRGB565; } + LOGE("Uknown color format (%s), please add it to " + "CameraSource::getColorFormat", colorFormat); + CHECK_EQ(0, "Unknown color format"); } diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp index de4233d..f0d8943 100644 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -1675,9 +1675,9 @@ status_t MPEG4Writer::Track::threadEntry() { } - if (mSampleSizes.empty()) { - err = ERROR_MALFORMED; - } else if (OK != checkCodecSpecificData()) { + if (mSampleSizes.empty() || // no samples written + (!mIsAudio && mNumStssTableEntries == 0) || // no sync frames for video + (OK != checkCodecSpecificData())) { // no codec specific data err = ERROR_MALFORMED; } mOwner->trackProgressStatus(this, -1, err); @@ -1794,13 +1794,13 @@ status_t MPEG4Writer::Track::checkCodecSpecificData() const { !strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) { if (!mCodecSpecificData || mCodecSpecificDataSize <= 0) { - // Missing codec specific data + LOGE("Missing codec specific data"); return ERROR_MALFORMED; } } else { if (mCodecSpecificData || mCodecSpecificDataSize > 0) { - // Unexepected codec specific data found + LOGE("Unexepected codec specific data found"); return ERROR_MALFORMED; } } diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 165cec9..fd23b61 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -811,8 +811,7 @@ status_t OMXCodec::isColorFormatSupported( if (OMX_ErrorNone != mOMX->getParameter( mNode, OMX_IndexParamVideoPortFormat, &portFormat, sizeof(portFormat))) { - - return UNKNOWN_ERROR; + break; } // Make sure that omx component does not overwrite // the incremented index (bug 2897413). @@ -832,6 +831,8 @@ status_t OMXCodec::isColorFormatSupported( break; } } + + LOGE("color format %d is not supported", colorFormat); return UNKNOWN_ERROR; } |