stream = adaptive_demux->streams->data;
+#ifdef TIZEN_FEATURE_UPSTREAM
+ /* Make sure we keep a reference in case we need to switch back */
+ previous_variant = gst_hls_variant_stream_ref (demux->current_variant);
+#else
previous_variant = demux->current_variant;
+#endif
#ifdef TIZEN_FEATURE_ADAPTIVE_MODIFICATION
new_variant =
gst_hls_master_playlist_get_variant_for_bandwitdh_limit (demux->master,
/* Don't do anything else if the playlist is the same */
if (new_bandwidth == old_bandwidth) {
GST_M3U8_CLIENT_UNLOCK (demux->client);
+#ifdef TIZEN_FEATURE_UPSTREAM
+ gst_hls_variant_stream_unref (previous_variant);
+#endif
return TRUE;
}
return gst_hls_demux_change_playlist (demux, new_bandwidth - 1, changed);
}
+#ifdef TIZEN_FEATURE_UPSTREAM
+ gst_hls_variant_stream_unref (previous_variant);
+#endif
return TRUE;
}