--- gst-libs/gst/app/gstappsink.c.orig	2010-12-08 14:35:05.593916449 +0200
+++ gst-libs/gst/app/gstappsink.c	2010-12-08 14:35:14.829916012 +0200
@@ -615,10 +615,13 @@ gst_app_sink_flush_unlocked (GstAppSink 
   GstAppSinkPrivate *priv = appsink->priv;
 
   GST_DEBUG_OBJECT (appsink, "flush stop appsink");
+  priv->flushing = TRUE;
   priv->is_eos = FALSE;
   gst_buffer_replace (&priv->preroll, NULL);
   while ((obj = g_queue_pop_head (priv->queue)))
     gst_mini_object_unref (obj);
+
+  priv->flushing = FALSE;
   g_cond_signal (priv->cond);
 }
 
@@ -644,7 +647,6 @@ gst_app_sink_stop (GstBaseSink * psink)
 
   g_mutex_lock (priv->mutex);
   GST_DEBUG_OBJECT (appsink, "stopping");
-  priv->flushing = TRUE;
   priv->started = FALSE;
   gst_app_sink_flush_unlocked (appsink);
   g_mutex_unlock (priv->mutex);
