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

A nil error for certain (invalid only?) video files. #50

Open
tomichal opened this issue Jan 15, 2020 · 2 comments
Open

A nil error for certain (invalid only?) video files. #50

tomichal opened this issue Jan 15, 2020 · 2 comments

Comments

@tomichal
Copy link
Contributor

This seems to be an edge case for some video files.
When the metadata info 'tracks' XML element is empty, this code will blow up:
https://github.com/greatseth/mediainfo/blob/1eb021d8018a37b0cd3604d55c17a3e7a1eef56c/lib/mediainfo/tracks.rb#L40 since ::REXML::Element#text, i.e.: parameter.text will return nil.

@tomichal
Copy link
Contributor Author

Btw, the error does not happen for when Nokogiri is used, only for when the Ruby native REXML parser is used.

@NorseGaud
Copy link
Collaborator

Hey @tomichal what do you suggest for user experience? Should we throw a warning "tracks not found"?

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

2 participants