}
/* and set all streams to the final position */
+ gst_flow_combiner_reset (qtdemux->flowcombiner);
for (n = 0; n < qtdemux->n_streams; n++) {
QtDemuxStream *stream = qtdemux->streams[n];
gst_element_post_message (GST_ELEMENT_CAST (qtdemux), msg);
}
+ /* restart streaming, NEWSEGMENT will be sent from the streaming thread. */
gst_pad_start_task (qtdemux->sinkpad, (GstTaskFunction) gst_qtdemux_loop,
qtdemux->sinkpad, NULL);
qtdemux->timescale = 0;
qtdemux->got_moov = FALSE;
} else if (qtdemux->mss_mode) {
+ gst_flow_combiner_reset (qtdemux->flowcombiner);
for (n = 0; n < qtdemux->n_streams; n++)
gst_qtdemux_stream_clear (qtdemux, qtdemux->streams[n]);
} else {
+ gst_flow_combiner_reset (qtdemux->flowcombiner);
for (n = 0; n < qtdemux->n_streams; n++) {
qtdemux->streams[n]->sent_eos = FALSE;
qtdemux->streams[n]->segment_seqnum = 0;
gst_event_set_seqnum (event, stream->segment_seqnum);
}
gst_pad_push_event (stream->pad, event);
+ /* assume we can send more data now */
+ GST_PAD_LAST_FLOW_RETURN (stream->pad) = GST_FLOW_OK;
/* clear to send tags on this pad now */
gst_qtdemux_push_tags (qtdemux, stream);
}
* GST_FLOW_EOS: when all pads EOS or NOT_LINKED.
*/
static GstFlowReturn
-gst_qtdemux_combine_flows (GstQTDemux * demux, GstFlowReturn ret)
+gst_qtdemux_combine_flows (GstQTDemux * demux, QtDemuxStream * stream,
+ GstFlowReturn ret)
{
GST_LOG_OBJECT (demux, "flow return: %s", gst_flow_get_name (ret));
- ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
+ if (stream->pad)
+ ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner, stream->pad,
+ ret);
+ else
+ ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
GST_LOG_OBJECT (demux, "combined flow return: %s", gst_flow_get_name (ret));
return ret;
}
/* combine flows */
- ret = gst_qtdemux_combine_flows (qtdemux, ret);
+ ret = gst_qtdemux_combine_flows (qtdemux, stream, ret);
/* ignore unlinked, we will not push on the pad anymore and we will EOS when
* we have no more data for the pad to push */
if (ret == GST_FLOW_EOS)
}
/* combine flows */
- ret = gst_qtdemux_combine_flows (demux, ret);
+ ret = gst_qtdemux_combine_flows (demux, stream, ret);
} else {
/* skip this data, stream is EOS */
gst_adapter_flush (demux->adapter, demux->neededbytes);