/* WITH SELECTION_LOCK TAKEN! */
static void
-check_all_streams_for_eos (GstDecodebin3 * dbin)
+check_all_streams_for_eos (GstDecodebin3 * dbin, GstEvent * event)
{
GList *tmp;
GList *outputpads = NULL;
GstPad *peer = (GstPad *) tmp->data;
/* Send EOS and then remove elements */
- gst_pad_send_event (peer, gst_event_new_eos ());
+ gst_pad_send_event (peer, gst_event_ref (event));
GST_FIXME_OBJECT (peer, "Remove input stream");
gst_object_unref (peer);
}
if (all_inputs_are_eos (input->dbin)) {
GST_DEBUG_OBJECT (pad, "real input pad, marking as EOS");
SELECTION_LOCK (input->dbin);
- check_all_streams_for_eos (input->dbin);
+ check_all_streams_for_eos (input->dbin, ev);
SELECTION_UNLOCK (input->dbin);
} else {
GstPad *peer = gst_pad_get_peer (input->srcpad);
g_free (ppad);
SELECTION_LOCK (dbin);
- check_all_streams_for_eos (dbin);
+ check_all_streams_for_eos (dbin, ev);
SELECTION_UNLOCK (dbin);
}
break;
/* Must be called with SELECTION_LOCK taken */
static void
-check_all_slot_for_eos (GstDecodebin3 * dbin)
+check_all_slot_for_eos (GstDecodebin3 * dbin, GstEvent * ev)
{
gboolean all_drained = TRUE;
GList *iter;
}
eos = gst_event_new_eos ();
+ gst_event_set_seqnum (eos, gst_event_get_seqnum (ev));
gst_mini_object_set_qdata (GST_MINI_OBJECT_CAST (eos),
CUSTOM_FINAL_EOS_QUARK, (gchar *) CUSTOM_FINAL_EOS_QUARK_DATA,
NULL);
free_multiqueue_slot_async (dbin, slot);
ret = GST_PAD_PROBE_REMOVE;
} else if (!was_drained) {
- check_all_slot_for_eos (dbin);
+ check_all_slot_for_eos (dbin, ev);
}
if (ret == GST_PAD_PROBE_HANDLED)
gst_event_unref (ev);
* when all output streams are also eos */
ret = GST_PAD_PROBE_DROP;
SELECTION_LOCK (dbin);
- check_all_slot_for_eos (dbin);
+ check_all_slot_for_eos (dbin, ev);
SELECTION_UNLOCK (dbin);
}
}