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

Provide an error to properly indicate EOF #246

Closed
ahicks92 opened this issue Jan 1, 2024 · 5 comments
Closed

Provide an error to properly indicate EOF #246

ahicks92 opened this issue Jan 1, 2024 · 5 comments
Milestone

Comments

@ahicks92
Copy link

ahicks92 commented Jan 1, 2024

I'm integrating Symphonia, and the only thing I can find on detecting EOF is the symphonia-play example, which is going as far as a string comparison on an error message. It seems like either FormatReader's next_packet should return Option<Packet>, or there should be a top-level error. Hopefully this isn't a duplicate of something or docs I'm missing.

@pdeljanov
Copy link
Owner

This is a very popular request, and one that I fully support. Since it's a breaking API change it will come in version 0.6. :)

@pdeljanov pdeljanov added this to the v0.6.0 milestone Jan 16, 2024
@ahicks92
Copy link
Author

Did I miss a duplicate ticket? I did look.

How involved would this be? If the answer is "not very" I may be willing to help, but I barely have time for my own projects as it is.

@hasezoey
Copy link

i think relevant would be #134

@pdeljanov
Copy link
Owner

I've been working locally on some 0.6 features and have this prototyped. It works, though, there are some regressions I am ironing out. I'll push it to a 0.6 development branch once those issues are resolved.

pdeljanov added a commit that referenced this issue Mar 11, 2024
The next_packet call now returns Result<Option<Packet>> instead of
Result<Packet>. A return value of Ok(None) indicates when the media
ends. Whereas an UnexpectedEof error now always indicates an
unexpected end to the media.

Fixes #246, #134.
@pdeljanov
Copy link
Owner

This has now been implemented in the dev-0.6 branch!

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

No branches or pull requests

3 participants