14 Jun 2012 13:13
Windows C++ application crush
Michael Zenov <penzus <at> gmail.com>
2012-06-14 11:13:00 GMT
2012-06-14 11:13:00 GMT
I made a simple demo program in C + + and run it in Linux and then Windows.
In Linux, everything is fine, but Windows program crashes. Video clip
= ~ 30 sec, audio clip = ~ 3.30 sec. Windows program crashes when the
video ends, the Linux program continues to play audio. The source code
below.
#include <Mlt.h>
using namespace Mlt;
using namespace std;
#include <iostream>
#include <stdlib.h>
#ifdef WIN32
extern "C" {
#include <SDL.h>
}
void eventHandling()
{
SDL_Event event;
while( SDL_PollEvent( &event ) ){
switch( event.type ){
case SDL_KEYDOWN:
if ( event.key.keysym.sym = SDLK_q ) {
std::cout<< "Nice exit" << std::endl;
exit(0);
}
default:
;
(Continue reading)
RSS Feed