summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-10-09 18:03:36 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-10-09 18:03:36 -0700
commit57a828527aed62032ad5aaa345ce5760c93e4a9d (patch)
treeb2a76ff98cddf9b805a538e1c98dfb5fc7f90201 /media
parenta9961f6786d048c247cd41363e2b784e1a5aeab4 (diff)
parentfc7a0312dd2a9dfc0c084e70b5898438875958f0 (diff)
downloadframeworks_av-57a828527aed62032ad5aaa345ce5760c93e4a9d.zip
frameworks_av-57a828527aed62032ad5aaa345ce5760c93e4a9d.tar.gz
frameworks_av-57a828527aed62032ad5aaa345ce5760c93e4a9d.tar.bz2
Merge "Stagefright: add a NULL check before accessing camera params"
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/CameraSource.cpp5
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;
}