]> git.vomp.tv Git - vompclient.git/commitdiff
Fixed media player not exiting properly due to new boxstack code
authorChris Tallon <chris@vomp.tv>
Sun, 1 Jun 2008 16:29:21 +0000 (16:29 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 1 Jun 2008 16:29:21 +0000 (16:29 +0000)
vaudioplayer.cc

index 821843c940fae73fbb6315738a4ff51a7df32d38..b50feb3c8db9d4298a06517fda67ae116dc5602c 100644 (file)
@@ -68,6 +68,13 @@ AudioPlayer * VAudioplayer::getPlayer(bool createIfNeeded)
 
 VAudioplayer::~VAudioplayer()
 {
+  // Note from Chris:
+  // As of > 0.2.7 BoxStack has its own locking, this means returning 4 (delete me)
+  // in VAudioPlayer::handleCommand (case BACK) doesn't work as expected any more.
+  // BoxStack calls this destructor but BoxStack is locked at that point, so its not
+  // possible to call boxstack->remove(banner) here anymore. I left the call in,
+  // but inserted a destroyBanner() call in the handleCommand function.
+
   if (banner) BoxStack::getInstance()->remove(banner);
   if (fullname) delete fullname;
   if (filename) delete filename;
@@ -196,6 +203,7 @@ int VAudioplayer::handleCommand(int command)
       break;
     case Remote::BACK:
     {
+      destroyBanner(); // This line inserted to prevent BoxStack deadlock in this class destructor - Chris
       rt= 4;
     }
     break;