mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 02:32:23 +00:00
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.
This commit is contained in:
parent
0d794993fb
commit
4e10667aad
1 changed files with 4 additions and 1 deletions
|
@ -452,6 +452,7 @@ mpegpsmux_choose_best_stream (MpegPsMux * mux)
|
||||||
|
|
||||||
buf = mpegpsmux_queue_buffer_for_stream (mux, ps_data);
|
buf = mpegpsmux_queue_buffer_for_stream (mux, ps_data);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
|
GST_DEBUG_OBJECT (mux, "we have EOS");
|
||||||
ps_data->eos = TRUE;
|
ps_data->eos = TRUE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -578,10 +579,12 @@ mpegpsmux_collected (GstCollectPads * pads, MpegPsMux * mux)
|
||||||
if (mux->gop_list != NULL)
|
if (mux->gop_list != NULL)
|
||||||
mpegpsmux_push_gop_list (mux);
|
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_WARNING_OBJECT (mux, "Writing MPEG PS Program end code failed.");
|
||||||
}
|
}
|
||||||
gst_pad_push_event (mux->srcpad, gst_event_new_eos ());
|
gst_pad_push_event (mux->srcpad, gst_event_new_eos ());
|
||||||
|
|
||||||
|
ret = GST_FLOW_EOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Reference in a new issue