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 stsz box, improve conditional fields handling #119

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

mat-hek
Copy link
Member

@mat-hek mat-hek commented Jan 8, 2025

  • fix stsz parsing and serialization
  • raise if a field required in when is absent in the context
  • don't include missing fields in the parsed output (instead of putting empty lists as their values)

@mat-hek mat-hek requested a review from varsill January 8, 2025 14:25
Comment on lines +255 to +256
if sample_sizes != [] and Enum.all?(sample_sizes) == hd(sample_sizes) do
%{sample_size: hd(sample_sizes), entry_list: []}
Copy link
Member Author

Choose a reason for hiding this comment

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

apparently we don't have a fixture to test this

@varsill varsill self-requested a review January 10, 2025 15:49
Copy link
Contributor

@varsill varsill left a comment

Choose a reason for hiding this comment

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

As discussed, the handle_when approach with serialization will be added in separate PR

@mat-hek mat-hek merged commit 9d49f1d into master Jan 13, 2025
4 checks passed
@mat-hek mat-hek deleted the fix-sample-sizes branch January 13, 2025 09:02
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