summaryrefslogtreecommitdiff
authorjiyu.yang <jiyu.yang@amlogic.com>2014-01-08 09:11:48 (GMT)
committer tao.dong <tao.dong@amlogic.com>2014-01-08 09:48:04 (GMT)
commit817df98a264ccbe2d37b63f67b2d1ed70d8a4ba2 (patch)
tree8271c8dc757c50f4dd8d6886b118f5686836b527
parent71885596e90957bc1d5173736a2e9143aa750fa9 (diff)
downloadcamera-817df98a264ccbe2d37b63f67b2d1ed70d8a4ba2.zip
camera-817df98a264ccbe2d37b63f67b2d1ed70d8a4ba2.tar.gz
camera-817df98a264ccbe2d37b63f67b2d1ed70d8a4ba2.tar.bz2
PD#81213: fix tn_width and camerahandle error
Diffstat
-rwxr-xr-xAppCallbackNotifier.cpp2
-rwxr-xr-xV4LCameraAdapter/V4LCameraAdapter.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/AppCallbackNotifier.cpp b/AppCallbackNotifier.cpp
index 724cb60..9f7ffd3 100755
--- a/AppCallbackNotifier.cpp
+++ b/AppCallbackNotifier.cpp
@@ -958,7 +958,7 @@ void AppCallbackNotifier::notifyFrame()
if(frame->mHeight>frame->mWidth){
int temp = tn_width;
tn_width = tn_height;
- tn_height = tn_width;
+ tn_height = temp;
}
if ((tn_width > 0) && (tn_height > 0)) {
diff --git a/V4LCameraAdapter/V4LCameraAdapter.cpp b/V4LCameraAdapter/V4LCameraAdapter.cpp
index 4c48651..59f3dbb 100755
--- a/V4LCameraAdapter/V4LCameraAdapter.cpp
+++ b/V4LCameraAdapter/V4LCameraAdapter.cpp
@@ -1380,7 +1380,7 @@ V4LCameraAdapter::~V4LCameraAdapter()
LOG_FUNCTION_NAME;
// Close the camera handle and free the video info structure
- if(mCameraHandle){
+ if (mCameraHandle > 0) {
close(mCameraHandle);
mCameraHandle = -1;
}