[Live-devel] bug: testProgs/playCommon.cpp: task is not properly unscheduled in continuous play

Anon Sricharoenchai anon.hui at gmail.com
Fri Jul 24 04:21:11 PDT 2009


When playing continuously, it should unschedule the following tasks,
before continue playing.

testProgs/playCommon.cpp:

 void sessionAfterPlaying(void* /*clientData*/) {
   if (!playContinuously) {
     shutdown(0);
   } else {
+    // unschedule these task, since it will be rescheduled by
+    // startPlayingStreams()
+    if (env != NULL) {
+      env->taskScheduler().unscheduleDelayedTask(sessionTimerTask);
+      env->taskScheduler().unscheduleDelayedTask(arrivalCheckTimerTask);
+      env->taskScheduler().unscheduleDelayedTask(interPacketGapCheckTimerTask);
+      env->taskScheduler().unscheduleDelayedTask(qosMeasurementTimerTask);
+      sessionTimerTask = NULL;
+      arrivalCheckTimerTask = NULL;
+      interPacketGapCheckTimerTask = NULL;
+      qosMeasurementTimerTask = NULL;
+    }
+    // reset this, to ensure that checkInterPacketGaps() called by
+    // startPlayingStreams() will not close the session
+    totNumPacketsReceived = ~0;
     // We've been asked to play the stream(s) over again:
     startPlayingStreams();
   }
 }


More information about the live-devel mailing list