diff options
author | Andreas Huber <andih@google.com> | 2010-05-20 11:14:37 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-05-20 11:14:37 -0700 |
commit | cf14f10b7bf39a84205333b87d5c5b7db9598de3 (patch) | |
tree | ff7c34553515179dbd980e5c0010b44b394f7fab /media/libstagefright/codecs | |
parent | 956c553ab0ce72f8074ad0fda2ffd66a0305700c (diff) | |
parent | 8fe7fa8f90e52cab210ec1de861f2d8ac9435968 (diff) | |
download | frameworks_av-cf14f10b7bf39a84205333b87d5c5b7db9598de3.zip frameworks_av-cf14f10b7bf39a84205333b87d5c5b7db9598de3.tar.gz frameworks_av-cf14f10b7bf39a84205333b87d5c5b7db9598de3.tar.bz2 |
am 3c16154a: am 2723e092: Merge "Better handling of codec initialization failure in the player and thumbnail extractor. Return a runtime error instead of asserting if the software MPEG4/H.263 decoder fails to initialize." into froyo
Merge commit '3c16154a3309fe250177d69f3fcd5b6e9a82d1b3' into kraken
* commit '3c16154a3309fe250177d69f3fcd5b6e9a82d1b3':
Better handling of codec initialization failure in the player and thumbnail extractor. Return a runtime error instead of asserting if the software MPEG4/H.263 decoder fails to initialize.
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r-- | media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp b/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp index 40009f8..8350f7a 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp @@ -120,9 +120,16 @@ status_t M4vH263Decoder::start(MetaData *) { vol_size = 0; } - CHECK_EQ(PV_TRUE, PVInitVideoDecoder( - mHandle, vol_data, &vol_size, 1, mWidth, mHeight, mode)); + + Bool success = PVInitVideoDecoder( + mHandle, vol_data, &vol_size, 1, mWidth, mHeight, mode); if (vol_data[0]) free(vol_data[0]); + + if (success != PV_TRUE) { + LOGW("PVInitVideoDecoder failed. Unsupported content?"); + return ERROR_UNSUPPORTED; + } + MP4DecodingMode actualMode = PVGetDecBitstreamMode(mHandle); CHECK_EQ(mode, actualMode); |