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

Fix a case when seek keyframe goes to eof #82

Merged
merged 1 commit into from
Jul 18, 2020

Conversation

innerlee
Copy link
Contributor

In very rare cases, seeking keyframe might go to the end of file because currently we used the flag 0 sometimes.

@@ -35,7 +35,7 @@ namespace runtime {
class NDArray {
public:
// pts of the frame
int pts=0;
int pts=-1;
Copy link
Member

Choose a reason for hiding this comment

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

will pts be checked by NextFrameImpl?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, NextFrameImpl currently does not check this value. This value is checked in CheckKeyFrame to detect eof pattern.

BTW, how about using AV_NOPTS_VALUE constant as the init value of pts, instead of this -1?

Copy link
Member

Choose a reason for hiding this comment

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

It's actually fine with -1, introducing AV_NOPTS_VALUE to runtime lib will add an extra dependency in the core modules.

@innerlee
Copy link
Contributor Author

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.

None yet

2 participants