summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2010-06-24 19:29:17 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2010-06-24 19:29:17 -0300
commitec3b13a250633d9fd97729f359882000f7c2a524 (patch)
tree8493e54befe8ebcb2a3d769bd0d53a127fb72b75
parent054f0ca781e93addff75b037b7f8e37792898f8c (diff)
asfdemux: Fix sending eos event for chained asfs
Properly push EOS event when finishing a chained asf file in pull mode Fixes #599718
-rw-r--r--gst/asfdemux/gstasfdemux.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index 2e86a43d..8848afcc 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -1113,7 +1113,7 @@ all_streams_prerolled (GstASFDemux * demux)
guint i, num_no_data = 0;
/* Allow at least 500ms of preroll_time */
- preroll_time = MAX(demux->preroll, 500 * GST_MSECOND);
+ preroll_time = MAX (demux->preroll, 500 * GST_MSECOND);
/* returns TRUE as long as there isn't a stream which (a) has data queued
* and (b) the timestamp of last piece of data queued is < demux->preroll
@@ -1483,6 +1483,7 @@ gst_asf_demux_loop (GstASFDemux * demux)
GstFlowReturn flow = GST_FLOW_OK;
GstBuffer *buf = NULL;
guint64 off;
+ gboolean sent_eos = FALSE;
if (G_UNLIKELY (demux->state == GST_ASF_DEMUX_STATE_HEADER)) {
if (!gst_asf_demux_pull_headers (demux)) {
@@ -1622,21 +1623,22 @@ eos:
gst_asf_demux_reset (demux, TRUE);
return;
}
- /* normal playback, send EOS to all linked pads */
- GST_INFO_OBJECT (demux, "Sending EOS, at end of stream");
- gst_asf_demux_send_event_unlocked (demux, gst_event_new_eos ());
}
+ /* normal playback, send EOS to all linked pads */
+ GST_INFO_OBJECT (demux, "Sending EOS, at end of stream");
+ gst_asf_demux_send_event_unlocked (demux, gst_event_new_eos ());
+ sent_eos = TRUE;
/* ... and fall through to pause */
- GST_DEBUG_OBJECT (demux, "EOSing");
}
pause:
{
- GST_DEBUG_OBJECT (demux, "pausing task");
+ GST_DEBUG_OBJECT (demux, "pausing task, flow return: %s",
+ gst_flow_get_name (flow));
demux->segment_running = FALSE;
gst_pad_pause_task (demux->sinkpad);
/* For the error cases (not EOS) */
- if (GST_FLOW_IS_FATAL (flow) || flow == GST_FLOW_NOT_LINKED) {
+ if (!sent_eos) {
/* Post an error. Hopefully something else already has, but if not... */
GST_ELEMENT_ERROR (demux, STREAM, FAILED,
(_("Internal data stream error.")),