assrender: Unlock and free any pending subtitle buffers on FLUSH_START

This commit is contained in:
Sebastian Dröge 2009-11-04 13:07:27 +01:00
parent 3b2ab1299c
commit e38fbc6795

View 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;