Skip to content

Commit

Permalink
Return the correct AVIF alpha item bit depth.
Browse files Browse the repository at this point in the history
There was a typo which made the avif_get_info API call return the primary item's bit depth for the alpha item.
  • Loading branch information
Zaggy1024 authored and kinetiknz committed Jan 22, 2023
1 parent 55eb92e commit 19f50c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mp4parse_capi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ fn mp4parse_avif_get_info_safe(context: &AvifContext) -> mp4parse::Result<Mp4par
let primary_item_bit_depth =
get_bit_depth(context.primary_item_bits_per_channel().unwrap_or(Ok(&[]))?);
let alpha_item_bit_depth =
get_bit_depth(context.primary_item_bits_per_channel().unwrap_or(Ok(&[]))?);
get_bit_depth(context.alpha_item_bits_per_channel().unwrap_or(Ok(&[]))?);

if let Some(sequence) = &context.sequence {
// Tracks must have track_id and samples
Expand Down

0 comments on commit 19f50c2

Please sign in to comment.