void Player::stop()
{
lock();
+ logger->log("Player", Log::DEBUG, "Stop called lock");
stopInt();
unLock();
}
vfeed.stop();
afeed.stop();
- threadStop();
+ if (threadIsActive()) threadStop();
video->stop();
video->blank();
audio->stop();
threadBuffer = vdr->getBlock(feedPosition, askFor, &thisRead);
#ifdef NEW_DEMUXER
- currentposition=feedPosition;
- #endif
+ currentposition=feedPosition;
+#endif
if (!vdr->isConnected())
{
doConnectionLost();
// end of recording
logger->log("Player", Log::DEBUG, "Recording playback ends");
+ if (videoStartup) // oh woe. there never was a stream, I was conned!
+ {
+ videoStartup = false;
+ unLock();
+ MILLISLEEP(500); // I think this will solve a race
+ }
+
threadCheckExit();
Message* m = new Message(); // Must be done after this thread finishes, and must break into master mutex