adaptivedemux2: Remove gst_adaptive_demux2_stream_has_selected_tracks

Use gst_adaptive_demux2_stream_is_selected_locked() instead, which is identical

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
This commit is contained in:
Jan Schmidt 2022-12-27 03:46:47 +11:00 committed by GStreamer Marge Bot
parent 8d0c7d9d93
commit d3acafbb5a
2 changed files with 3 additions and 18 deletions

View file

@ -2170,6 +2170,8 @@ gst_adaptive_demux2_stream_is_running (GstAdaptiveDemux2Stream * stream)
return TRUE;
}
/* Returns TRUE if the stream has at least one selected track.
* Must be called with the TRACKS_LOCK held */
gboolean
gst_adaptive_demux2_stream_is_selected_locked (GstAdaptiveDemux2Stream * stream)
{

View file

@ -2363,23 +2363,6 @@ gst_adaptive_demux_handle_seek_event (GstAdaptiveDemux * demux,
return ret;
}
/* Returns TRUE if the stream has at least one selected track */
static gboolean
gst_adaptive_demux2_stream_has_selected_tracks (GstAdaptiveDemux2Stream *
stream)
{
GList *tmp;
for (tmp = stream->tracks; tmp; tmp = tmp->next) {
GstAdaptiveDemuxTrack *track = tmp->data;
if (track->selected)
return TRUE;
}
return FALSE;
}
static gboolean
handle_stream_selection (GstAdaptiveDemux * demux, GList * streams,
guint32 seqnum)
@ -2448,7 +2431,7 @@ handle_stream_selection (GstAdaptiveDemux * demux, GList * streams,
gboolean is_running = gst_adaptive_demux2_stream_is_running (stream);
gboolean should_be_running =
gst_adaptive_demux2_stream_has_selected_tracks (stream);
gst_adaptive_demux2_stream_is_selected_locked (stream);
if (!is_running && should_be_running) {
GstClockTime output_running_ts = demux->priv->global_output_position;