Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stall on period transition with CEA-608 #2075

Closed
sath33sh opened this issue Aug 1, 2019 · 3 comments
Closed

Stall on period transition with CEA-608 #2075

sath33sh opened this issue Aug 1, 2019 · 3 comments
Assignees
Labels
component: captions/subtitles The issue involves captions or subtitles status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@sath33sh
Copy link
Contributor

sath33sh commented Aug 1, 2019

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
v2.5.4

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from master?
Yes

Are you using the demo app or your own custom app?
Custom app

If custom app, can you reproduce the issue using our demo app?
I did not try the demo app

What browser and OS are you using?
Chrome 75.0.3770.142 on Mac OS 10.14.5

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A

What are the manifest and license server URIs?

https://www.philo.com/manifest/vod/8ee733eef854021a0189826a8dfe1a2c2358bf74/manifest.mpd?content_host=prod.cdn-vdms.philo.com

What did you do?

Play a VOD asset with multiple periods and seek from one period to start of next period.

What did you expect to happen?
Transition between periods without any errors.

What actually happened?

Playback stalled before the start of next period. Console shows the following assert failures:

streaming_engine.js:2207 Assertion failed: All MediaStates should need the same Period or be performing updates.
shaka.media.StreamingEngine.handlePeriodTransition_ @ streaming_engine.js:2207
shaka.media.StreamingEngine.onUpdate_ @ streaming_engine.js:1293

I suspect that CEA-608 text stream's mediaState is not updated correctly. Following patch reduces the number of assert failures and fixes the stall, however, presence of assert failures indicate that the patch is not complete. Creating this bug to start a discussion before I debug further.

diff --git a/lib/media/streaming_engine.js b/lib/media/streaming_engine.js
index 2b8840cf..e6d04b1d 100644
--- a/lib/media/streaming_engine.js
+++ b/lib/media/streaming_engine.js
@@ -1406,6 +1406,14 @@ shaka.media.StreamingEngine.prototype.update_ = function(mediaState) {
   // of SegmentReferences as an indicator to determine Period boundaries
   // because a SegmentIndex can provide SegmentReferences outside its Period.
   mediaState.needPeriodIndex = needPeriodIndex;
+  if (mediaState.type == ContentType.VIDEO) {
+    // Update needPeriodIndex of text stream if it is CEA closed captions
+    const textState = this.mediaStates_.get(ContentType.TEXT);
+    if (textState && textState.stream.mimeType ==
+          shaka.util.MimeUtils.CLOSED_CAPTION_MIMETYPE) {
+      textState.needPeriodIndex = needPeriodIndex;
+    }
+  }
   if (needPeriodIndex != currentPeriodIndex) {
     shaka.log.debug(logPrefix,
                     'need Period ' + needPeriodIndex,
@ismena ismena added the component: captions/subtitles The issue involves captions or subtitles label Aug 1, 2019
@joeyparrish
Copy link
Member

Thank you for the report. I'm in the middle of some changes for v2.6 that will remove periods at the streaming level and push that back into the DASH parser only, so needPeriodIndex and those assertions are all on their way out.

How urgently do you need this fixed? Would the patch above work for you in production until v2.6 is released? (I don't have a release date for v2.6 yet.)

@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Aug 16, 2019
@shaka-bot
Copy link
Collaborator

Closing due to inactivity. If this is still an issue for you or if you have further questions, you can ask us to reopen or have the bot reopen it by including @shaka-bot reopen in a comment.

@shaka-bot shaka-bot removed needs triage status: waiting on response Waiting on a response from the reporter(s) of the issue labels Aug 23, 2019
@joeyparrish joeyparrish reopened this Aug 23, 2019
@joeyparrish joeyparrish added the type: bug Something isn't working correctly label Aug 23, 2019
@joeyparrish joeyparrish added this to the v2.6 milestone Aug 23, 2019
TheModMaker added a commit that referenced this issue Aug 23, 2019
Since embedded text tracks are not "real" tracks, we need to ignore them
when handling Period transitions.  This ensures that the other streams
will handle the transition instead of waiting for the text stream to get
updated.

Fixes #2075
Fixes #2094

Change-Id: I2c7c92cb04795edb3f7695677ee6745bad3f4471
@joeyparrish
Copy link
Member

Good news! This was fixed today and the fix will be in v2.5.5.

@shaka-project shaka-project locked and limited conversation to collaborators Oct 22, 2019
@TheModMaker TheModMaker self-assigned this Feb 27, 2020
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: captions/subtitles The issue involves captions or subtitles status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

5 participants