getIndexBasedSegment() can return null but there is no prevent code
Created by: uyeong
Environment
-
The MPD passes the DASH-IF Conformance Tool on https://conformance.dashif.org/ -
The stream has correct Access-Control-Allow-Origin headers (CORS) -
There are no network errors such as 404s in the browser console when trying to play the stream -
The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ -
The issue occurs in the latest reference client on http://reference.dashif.org/dash.js/ and not just on my page
- Link to playable MPD file:
- Dash.js version: 3.1.0
- Browser name/version: All
- OS name/version: All
Depending on the packaging state, getIndexBasedSegment()
sometimes returns null. but there is no prevent code.
src/dash/utils/ListSegmentsGetter.js
getIndexBasedSegment()
that is called by getSegmentByIndex()
may return null, so i think it need code to prevent null reference error.