Flush the AsyncQueue when the stream ends.
authorZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Tue, 13 Jan 2009 14:33:29 +0000 (14:33 +0000)
committerZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Tue, 13 Jan 2009 14:33:29 +0000 (14:33 +0000)
svn path=/trunk/; revision=438

src/rygel/rygel-gst-stream.vala

index c31fa78..fa13c06 100644 (file)
@@ -63,6 +63,11 @@ public class Rygel.GstStream : Rygel.Stream {
 
     public override void end (bool aborted) {
         this.pipeline.set_state (State.NULL);
+        // Flush the queue of buffers
+        Buffer buffer = null;
+        do {
+            buffer = this.buffers.try_pop ();
+        } while (buffer != null);
 
         base.end (aborted);
     }