Author: sayer
Date: 2008-09-24 00:45:20 +0200 (Wed, 24 Sep 2008)
New Revision: 1095

Modified:
   branches/1.0.0/core/AmPlaylist.cpp
Log:
backport from trunk (1094)
fix leak in Playlist, when close() called if playlist play has not yet begun

patch by Rui Jin Zheng rjzheng at boronetworks dot com



Modified: branches/1.0.0/core/AmPlaylist.cpp
===================================================================
--- branches/1.0.0/core/AmPlaylist.cpp  2008-09-23 22:44:16 UTC (rev 1094)
+++ branches/1.0.0/core/AmPlaylist.cpp  2008-09-23 22:45:20 UTC (rev 1095)
@@ -145,6 +145,11 @@
 void AmPlaylist::close(bool notify)
 {
   cur_mut.lock();
+  if(!cur_item && !items.empty()){
+    cur_item = items.front();
+    items.pop_front();
+  }
+
   while(cur_item)
     gotoNextItem(notify);
   cur_mut.unlock();

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to