mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-02 14:20:06 +00:00
hlsdemux: don't try to access non-existant iframe variant
If the playlist does not contain any iframe variants then demux->master->iframe_variants is NULL. If the previous variant is an iframe variant then there is at least one iframe variant and demux->master->iframe_variants->data can be safely used. https://bugzilla.gnome.org/show_bug.cgi?id=773635
This commit is contained in:
parent
ae2a5f1ba9
commit
c2920ec3ea
1 changed files with 10 additions and 8 deletions
|
@ -1574,14 +1574,16 @@ retry_failover_protection:
|
|||
GST_M3U8_CLIENT_UNLOCK (demux->client);
|
||||
gst_hls_demux_set_current_variant (demux, previous_variant);
|
||||
/* Try a lower bitrate (or stop if we just tried the lowest) */
|
||||
lowest_variant = demux->master->variants->data;
|
||||
lowest_ivariant = demux->master->iframe_variants->data;
|
||||
if (previous_variant->iframe && new_bandwidth == lowest_ivariant->bandwidth)
|
||||
return FALSE;
|
||||
if (!previous_variant->iframe && new_bandwidth == lowest_variant->bandwidth)
|
||||
return FALSE;
|
||||
else
|
||||
return gst_hls_demux_change_playlist (demux, new_bandwidth - 1, changed);
|
||||
if (previous_variant->iframe) {
|
||||
lowest_ivariant = demux->master->iframe_variants->data;
|
||||
if (new_bandwidth == lowest_ivariant->bandwidth)
|
||||
return FALSE;
|
||||
} else {
|
||||
lowest_variant = demux->master->variants->data;
|
||||
if (new_bandwidth == lowest_variant->bandwidth)
|
||||
return FALSE;
|
||||
}
|
||||
return gst_hls_demux_change_playlist (demux, new_bandwidth - 1, changed);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue