summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/cmd/capture.cpp3
-rw-r--r--noncore/multimedia/camera/gui/mainwindow.cpp2
-rw-r--r--noncore/multimedia/camera/lib/avi.c1
3 files changed, 5 insertions, 1 deletions
diff --git a/noncore/multimedia/camera/cmd/capture.cpp b/noncore/multimedia/camera/cmd/capture.cpp
index 688622b..6b8c63c 100644
--- a/noncore/multimedia/camera/cmd/capture.cpp
+++ b/noncore/multimedia/camera/cmd/capture.cpp
@@ -178,15 +178,18 @@ int main( int argc, char** argv )
#undef I_HATE_WRITING_HARDCODED_PARSES
}
if ( !ZCameraIO::instance()->isOpen() )
{
printf( "Error: Can't detect your camera. Exiting.\n" );
return -1;
}
c->checkSettings();
c->capture();
+
+ delete c;
+ delete a;
return 0;
}
diff --git a/noncore/multimedia/camera/gui/mainwindow.cpp b/noncore/multimedia/camera/gui/mainwindow.cpp
index 7f2a9bd..bde448d 100644
--- a/noncore/multimedia/camera/gui/mainwindow.cpp
+++ b/noncore/multimedia/camera/gui/mainwindow.cpp
@@ -537,25 +537,25 @@ void CameraMainWindow::timerEvent( QTimerEvent* )
captureX, captureY, 1000.0 / (_time.elapsed()/_videopics), _videopics ) );
}
void CameraMainWindow::stopVideoCapture()
{
killTimers();
ODevice::inst()->playTouchSound();
ODevice::inst()->setLedState( Led_Mail, Led_Off );
_capturing = false;
updateCaption();
::close( _capturefd );
- _framerate = 1000.0 / (_time.elapsed()/_videopics);
+ _framerate = static_cast<int>( 1000.0 / (_time.elapsed()/_videopics) );
QString name;
if ( outputTo == "Documents Folder" )
{
name.sprintf( "%s/Documents/video/%s/", (const char*) QDir::homeDirPath(), (const char*) captureFormat.lower() );
if ( !QDir( name ).exists() )
{
odebug << "creating directory " << name << oendl;
QString msg = "mkdir -p " + name;
system( msg.latin1() );
}
}
diff --git a/noncore/multimedia/camera/lib/avi.c b/noncore/multimedia/camera/lib/avi.c
index 77aba33..d99c016 100644
--- a/noncore/multimedia/camera/lib/avi.c
+++ b/noncore/multimedia/camera/lib/avi.c
@@ -9,24 +9,25 @@
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "avi.h"
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
int nframes;
int totalsize;
unsigned int* sizes;
void fprint_quartet(int fd, unsigned int i)
{
char data[4];
data[0] = (char) i%0x100;
i /= 0x100;
data[1] = (char) i%0x100;