Commit 4e10667a authored by Wim Taymans's avatar Wim Taymans

mpegpsmux: return GST_FLOW_EOS when we pushed EOS

Return GST_FLOW_EOS from the collected function when we pushed EOS or
else it simply keeps on calling our collected function.
parent 0d794993
......@@ -452,6 +452,7 @@ mpegpsmux_choose_best_stream (MpegPsMux * mux)
buf = mpegpsmux_queue_buffer_for_stream (mux, ps_data);
if (buf == NULL) {
GST_DEBUG_OBJECT (mux, "we have EOS");
ps_data->eos = TRUE;
continue;
}
......@@ -578,10 +579,12 @@ mpegpsmux_collected (GstCollectPads * pads, MpegPsMux * mux)
if (mux->gop_list != NULL)
mpegpsmux_push_gop_list (mux);
if (psmux_write_end_code (mux->psmux)) {
if (!psmux_write_end_code (mux->psmux)) {
GST_WARNING_OBJECT (mux, "Writing MPEG PS Program end code failed.");
}
gst_pad_push_event (mux->srcpad, gst_event_new_eos ());
ret = GST_FLOW_EOS;
}
done:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment