Changeset 110 for smplayer/trunk/src


Ignore:
Timestamp:
Jun 30, 2010, 6:45:00 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Smplayer: fixed a 1second delay

Location:
smplayer/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk/src/mplayerprocess.cpp

    r93 r110  
    129129          return;
    130130
    131 // as things could hang when pipe communication is done direct here, i do a seperate thread for it */
     131// as things could hang when pipe communication is done direct here, i do a seperate thread for it
    132132    pipeThread = new PipeThread(text, hpipe);
    133133   
    134134    pipeThread->start();
    135135    while (!pipeThread->isRunning() && !pipeThread->isFinished()) {
    136        qDebug("we spleep");
     136       qDebug("we sleep");
    137137       DosSleep(10);
    138138    }
    139     if (!pipeThread->wait(2000)) {
     139// we wait for max 2 seconds for the thread to be ended (we to this with max 20 loops)
     140    int count = 0;
     141    while (!pipeThread->wait(100) && count < 20) {
     142       count ++;
     143    }
     144    if (count >= 20) {
    140145       pipeThread->terminate();
    141146       qDebug("pipe communication terminated");
     
    889894       return;
    890895
    891     qDebug("pipe connected");   
     896//    qDebug("pipe connected");   
    892897    DosWrite( hpipe, text.data(), strlen( text.data() ), &cbActual );
    893898
  • smplayer/trunk/src/svn_revision.h

    r93 r110  
    1 #define SVN_REVISION "SVN-rUNKNOWN"
     1#define SVN_REVISION "SVN-r92"
Note: See TracChangeset for help on using the changeset viewer.