adaptivedemux2: period: Rename 'closed' flag to 'has_next_period'

The flag is used to tell the output loop that a
next period is present, since the output loop
can't call the gst_adaptive_demux_has_next_period()
method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2838>
This commit is contained in:
Jan Schmidt 2022-07-12 01:24:31 +10:00 committed by Tim-Philipp Müller
parent e89d84a178
commit 1863082efa
2 changed files with 5 additions and 5 deletions

View file

@ -1316,8 +1316,8 @@ gst_adaptive_demux_start_new_period (GstAdaptiveDemux * demux)
}
if (demux->input_period) {
GST_DEBUG_OBJECT (demux, "Closing previous period");
demux->input_period->closed = TRUE;
GST_DEBUG_OBJECT (demux, "Marking that previous period has a next one");
demux->input_period->has_next_period = TRUE;
}
GST_DEBUG_OBJECT (demux, "Setting up new period");
@ -3605,7 +3605,7 @@ restart:
goto restart;
if (global_output_position == GST_CLOCK_STIME_NONE
&& demux->output_period->closed) {
&& demux->output_period->has_next_period) {
GST_DEBUG_OBJECT (demux, "Period %d is drained, switching to next period",
demux->output_period->period_num);
if (!gst_adaptive_demux_advance_output_period (demux)) {

View file

@ -375,8 +375,8 @@ struct _GstAdaptiveDemuxPeriod
gboolean prepared;
/* TRUE if the period no longer receives any data (i.e. it is closed) */
gboolean closed;
/* TRUE if there is another period after this one */
gboolean has_next_period;
/* An increasing unique identifier for the period.
*