collectpads: reliably go to eos. Fixes #574160

Update collectpads status when removing pads.
This commit is contained in:
Stefan Kost 2009-03-04 21:21:56 +02:00
parent c20fb4c16f
commit 436b0e7275

View file

@ -82,6 +82,7 @@ GST_BOILERPLATE (GstCollectPads, gst_collect_pads, GstObject, GST_TYPE_OBJECT);
static void gst_collect_pads_clear (GstCollectPads * pads, static void gst_collect_pads_clear (GstCollectPads * pads,
GstCollectData * data); GstCollectData * data);
static GstFlowReturn gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer); static GstFlowReturn gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer);
static GstFlowReturn gst_collect_pads_check_collected (GstCollectPads * pads);
static gboolean gst_collect_pads_event (GstPad * pad, GstEvent * event); static gboolean gst_collect_pads_event (GstPad * pad, GstEvent * event);
static void gst_collect_pads_finalize (GObject * object); static void gst_collect_pads_finalize (GObject * object);
static void gst_collect_pads_init (GstCollectPads * pads, static void gst_collect_pads_init (GstCollectPads * pads,
@ -419,6 +420,11 @@ gst_collect_pads_remove_pad (GstCollectPads * pads, GstPad * pad)
GST_COLLECT_PADS_PAD_UNLOCK (pads); GST_COLLECT_PADS_PAD_UNLOCK (pads);
GST_OBJECT_LOCK (pad);
/* make sure we go to eos on last pad */
gst_collect_pads_check_collected (pads);
GST_OBJECT_UNLOCK (pad);
return TRUE; return TRUE;
unknown_pad: unknown_pad: