diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-10-09 18:03:36 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-10-09 18:03:36 -0700 |
commit | 57a828527aed62032ad5aaa345ce5760c93e4a9d (patch) | |
tree | b2a76ff98cddf9b805a538e1c98dfb5fc7f90201 | |
parent | a9961f6786d048c247cd41363e2b784e1a5aeab4 (diff) | |
parent | fc7a0312dd2a9dfc0c084e70b5898438875958f0 (diff) | |
download | frameworks_av-57a828527aed62032ad5aaa345ce5760c93e4a9d.zip frameworks_av-57a828527aed62032ad5aaa345ce5760c93e4a9d.tar.gz frameworks_av-57a828527aed62032ad5aaa345ce5760c93e4a9d.tar.bz2 |
Merge "Stagefright: add a NULL check before accessing camera params"
-rw-r--r-- | media/libstagefright/CameraSource.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index 41513fb..27a6086 100644 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -100,6 +100,11 @@ void CameraSourceListener::postDataTimestamp( } static int32_t getColorFormat(const char* colorFormat) { + if (!colorFormat) { + ALOGE("Invalid color format"); + return -1; + } + if (!strcmp(colorFormat, CameraParameters::PIXEL_FORMAT_YUV420P)) { return OMX_COLOR_FormatYUV420Planar; } |