hlsdemux: Fix NULL pointer dereference when checking if there is a next fragment

Thanks to Aleksandr <tumaleksandr@yandex.ua> for reporting and
suggesting the fix.

https://bugzilla.gnome.org/show_bug.cgi?id=774287
This commit is contained in:
Sebastian Dröge 2016-11-12 10:38:04 +02:00
parent ba2908aa2c
commit cff42b2b40

View file

@ -711,7 +711,7 @@ gst_m3u8_has_next_fragment (GstM3U8 * m3u8, gboolean forward)
cur = m3u8_find_next_fragment (m3u8, forward);
}
have_next = (forward && cur->next) || (!forward && cur->prev);
have_next = cur && ((forward && cur->next) || (!forward && cur->prev));
GST_M3U8_UNLOCK (m3u8);