diff options
author | Steve Kondik <shade@chemlab.org> | 2012-05-13 16:14:43 +0400 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2012-05-13 16:14:43 +0400 |
commit | 8ea65c29dd4ba3a11f521b1d50a8e2c21797ebc9 (patch) | |
tree | 00f4b54bf39f243b836a2ba9ba77534480ccdba0 /media | |
parent | a50c5ecfd2c049a4218922f5b3e8296b82f6a618 (diff) | |
parent | d40ec07fa1f5171fe350892695f93cfca32fffb5 (diff) | |
download | frameworks_base-8ea65c29dd4ba3a11f521b1d50a8e2c21797ebc9.zip frameworks_base-8ea65c29dd4ba3a11f521b1d50a8e2c21797ebc9.tar.gz frameworks_base-8ea65c29dd4ba3a11f521b1d50a8e2c21797ebc9.tar.bz2 |
Merge "Camera: sanity check for camcorder frame format parameter" into ics
Diffstat (limited to 'media')
-rwxr-xr-x | media/libstagefright/CameraSource.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index 040fc3b..d79df77 100755 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -276,8 +276,12 @@ static void getSupportedVideoSizes( */ status_t CameraSource::isCameraColorFormatSupported( const CameraParameters& params) { - mColorFormat = getColorFormat(params.get( - CameraParameters::KEY_VIDEO_FRAME_FORMAT)); + const char* fmt = params.get(CameraParameters::KEY_VIDEO_FRAME_FORMAT); + if (!fmt) { + LOGE("Missing parameter %s!", CameraParameters::KEY_VIDEO_FRAME_FORMAT); + return BAD_VALUE; + } + mColorFormat = getColorFormat(fmt); if (mColorFormat == -1) { return BAD_VALUE; } |