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

Allow transcoders advance to next track or EoS past selection end #230

Merged
merged 2 commits into from
Dec 23, 2022

Conversation

izzytwosheds
Copy link
Contributor

@izzytwosheds izzytwosheds commented Dec 23, 2022

One of recent bug reports (#216 ) has an interesting use case - metadata track that starts after selection range end. Current logic never advances far past the end of selection, so we never process that metadata track thus "hanging" indefinitely.

Changing trim logic to handle cases like this:

  • introduce new "end of range" transcoder state. It is similar to "end of stream" state, but it is less "final" - track transcoder is still allowed to advance to next track or end of current track.
  • new logic that correctly detects "end of range" and "end of stream" states
  • track transcoder's "end of range" state is still reported as "end of stream" to TransformationJob, to indicate that processing of that track is done and it is ok to complete the job.
  • if TransformationJob is not completed, it asks a TrackTranscoder to processNextFrame. If TrackTranscoder is in "end of range" state, it will simply advance to next track or its own EoS (whichever is first) without processing any frames. This way we can reach frames in all tracks.

Fix was tested manually with the test file provided in that bug report, fix worked. Unit tests were added.

@izzytwosheds izzytwosheds merged commit c96bbbf into linkedin:main Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants