mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-17 16:26:39 +03:00
Check position against null, not zero
a8ac3142 had a bug in which a switch at position zero would not result
in clearing anything. Positions may validly be zero, but never null.
Change-Id: I95a607df7bd6a41cf73f78122c3dcdda425fb145
This commit is contained in:
@@ -478,14 +478,14 @@ shaka.media.StreamingEngine.prototype.clear_ = function(mediaState, clear) {
|
||||
|
||||
goog.asserts.assert(position != null,
|
||||
'No segment under the playhead! This should not happen!');
|
||||
if (!position) {
|
||||
if (position == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
var reference = mediaState.stream.getSegmentReference(position);
|
||||
goog.asserts.assert(reference != null,
|
||||
'No reference for current position! This should not happen!');
|
||||
if (!reference) {
|
||||
if (reference == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user