assrender: Unlock and free any pending subtitle buffers on FLUSH_START
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 4 Nov 2009 12:07:27 +0000 (13:07 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 4 Nov 2009 12:07:27 +0000 (13:07 +0100)
ext/assrender/gstassrender.c

index 40fd03b2e4cf2e28f6e25793e12339484ae3d270..fdb8c8ee0cf0fd7107e42616e6c8aee5afc2ed5d 100644 (file)
@@ -757,6 +757,12 @@ gst_assrender_event_text (GstPad * pad, GstEvent * event)
         GST_OBJECT_UNLOCK (render);
         GST_DEBUG_OBJECT (render, "done flushing");
       }
+      g_mutex_lock (render->subtitle_mutex);
+      if (render->subtitle_pending)
+        gst_buffer_unref (render->subtitle_pending);
+      render->subtitle_pending = NULL;
+      g_cond_signal (render->subtitle_cond);
+      g_mutex_unlock (render->subtitle_mutex);
       gst_event_unref (event);
       ret = TRUE;
       break;