Bug 805377 - [Camera] Change to video record mode will cause app crash r=mikeh a=blocking-basecamp
authorTim Taubert <ttaubert@mozilla.com>
Fri, 26 Oct 2012 14:55:08 +0200
changeset 111661 97d5111dfb395b51870fd7e6c247a65d00c2da15
parent 111660 e8ed2b39b88c2adaa377572221ff46ea897a33fd
child 111662 6a9691cfc118dc485a8df23c46738c55a4708401
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersmikeh, blocking-basecamp
bugs805377
milestone19.0a1
Bug 805377 - [Camera] Change to video record mode will cause app crash r=mikeh a=blocking-basecamp
dom/camera/GonkRecorderProfiles.cpp
--- a/dom/camera/GonkRecorderProfiles.cpp
+++ b/dom/camera/GonkRecorderProfiles.cpp
@@ -180,17 +180,17 @@ GonkRecorderVideoProfile::~GonkRecorderV
 {
   DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
 }
 
 GonkRecorderProfileManager::GonkRecorderProfileManager(uint32_t aCameraId)
   : RecorderProfileManager(aCameraId)
 {
   DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
-  mMaxQualityIndex = CAMCORDER_QUALITY_LIST_END - CAMCORDER_QUALITY_LIST_START;
+  mMaxQualityIndex = sizeof(ProfileList) / sizeof(ProfileList[0]) - 1;
 }
 
 GonkRecorderProfileManager::~GonkRecorderProfileManager()
 {
   DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
 }
 
 bool