Author: rolf
Date: 2008-01-24 09:11:18 -0500 (Thu, 24 Jan 2008)
New Revision: 93794

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/media.cpp
Log:
* media.cpp: MediaElement::SetSource: only trigger the download after
  we've attached to the CompletedEvent.

Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2008-01-24 14:05:55 UTC (rev 93793)
+++ trunk/moon/src/ChangeLog    2008-01-24 14:11:18 UTC (rev 93794)
@@ -1,3 +1,8 @@
+2008-01-24  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
+       * media.cpp: MediaElement::SetSource: only trigger the download after 
we've
+         attached to the CompletedEvent.
+
 2008-01-23  Chris Toshok  <[EMAIL PROTECTED]>
 
        * runtime.cpp (Surface::HandleMouseEvent): don't crash when we

Modified: trunk/moon/src/media.cpp
===================================================================
--- trunk/moon/src/media.cpp    2008-01-24 14:05:55 UTC (rev 93793)
+++ trunk/moon/src/media.cpp    2008-01-24 14:11:18 UTC (rev 93794)
@@ -485,7 +485,7 @@
        download_complete = false;
        waiting_for_loaded = false;
        updating = false;
-       // play_pending = false; // Sites break if we reset this too..
+       // play_pending = false; // Halo breaks if we reset this too..
        tried_buffering = false;
        previous_position = 0;
        
@@ -951,12 +951,14 @@
                downloaded_file->Initialize ();
                
                downloader->SetWriteFunc (data_write, size_notify, this);
-               // This is what actually triggers the download
-               downloader->Send ();
        }
        
        if (!download_complete)
                downloader->AddHandler (downloader->CompletedEvent, 
downloader_complete, this);
+               
+       // This is what actually triggers the download
+       if (downloaded_file != NULL)
+               downloader->Send ();
        
        Invalidate ();  
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to