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

decoder: Error out on segments with no keyframe packets #220

Merged
merged 2 commits into from
Jan 21, 2021

Conversation

jailuthra
Copy link
Contributor

@jailuthra jailuthra commented Jan 20, 2021

Why?
The video decoder currently gets stuck in an infinite loop while flushing if the input segment does not contain any keyframes, as it uses the first keyframe packet to flush the decoder buffer.

What?
If no keyframe packet is found after reading and sending all packets to the decoder, return an explicit error and don't try to flush.

Testing

  • Manually tested on a segment with no keyframes
  • Existing unit test suite works
  • Added a commented out test case for segment with no keyframes

Fixes
Fixes #219

@jailuthra jailuthra assigned jailuthra and unassigned jailuthra Jan 21, 2021
@jailuthra jailuthra marked this pull request as ready for review January 21, 2021 13:15
@jailuthra jailuthra changed the title [WIP] decoder: handle kryptonite segs decoder: Error out on segments with no keyframe packets Jan 21, 2021
ffmpeg/transcoder.c Outdated Show resolved Hide resolved
ffmpeg/api_test.go Outdated Show resolved Hide resolved
Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

Transcoder stuck for input segments with no keyframes but valid stream information
2 participants