diff options
Diffstat (limited to 'media/libstagefright/colorconversion/ColorConverter.cpp')
-rw-r--r-- | media/libstagefright/colorconversion/ColorConverter.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/media/libstagefright/colorconversion/ColorConverter.cpp b/media/libstagefright/colorconversion/ColorConverter.cpp index 0ef85e6..5bda1f6 100644 --- a/media/libstagefright/colorconversion/ColorConverter.cpp +++ b/media/libstagefright/colorconversion/ColorConverter.cpp @@ -136,9 +136,21 @@ status_t ColorConverter::convert( case QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka: { void * lib = dlopen("libmm-color-convertor.so", RTLD_NOW); + + if (!lib) { + LOGE("dlopen for libmm-color-convertor failed with errno %d", errno); + return ERROR_UNSUPPORTED; + } + + typedef int (*convertFn)(ColorConvertParams src, ColorConvertParams dst, uint8_t *adjustedClip); - convertFn convertNV12Tile = (convertFn)dlsym(lib, "_Z7convertN7android18ColorConvertParamsES0_Ph"); + convertFn convertNV12Tile = (convertFn)dlsym(lib, "_ZN7android7convertENS_18ColorConvertParamsES0_Ph"); + if (!convertNV12Tile) { + dlclose(lib); + LOGE("dlsym on libmm-color-convertor failed with errno %d", errno); + return ERROR_UNSUPPORTED; + } struct ColorConvertParams srcTemp; srcTemp.width = srcWidth; |