@@ -1280,7 +1280,7 @@ pub fn read_avif<T: Read>(f: &mut T, context: &mut AvifContext) -> Result<()> {
1280
1280
meta. properties . iter ( ) . any ( |prop| {
1281
1281
prop. item_id == item_id
1282
1282
&& match & prop. property {
1283
- ImageProperty :: AuxiliaryType ( urn) => {
1283
+ ItemProperty :: AuxiliaryType ( urn) => {
1284
1284
urn. as_slice ( )
1285
1285
== "urn:mpeg:mpegB:cicp:systems:auxiliary:alpha" . as_bytes ( )
1286
1286
}
@@ -1563,7 +1563,7 @@ fn read_iprp<T: Read>(src: &mut BMFFBox<T>) -> Result<TryVec<AssociatedProperty>
1563
1563
x => x as usize - 1 ,
1564
1564
} ;
1565
1565
if let Some ( prop) = properties. get ( index) {
1566
- if * prop != ImageProperty :: Unsupported {
1566
+ if * prop != ItemProperty :: Unsupported {
1567
1567
associated. push ( AssociatedProperty {
1568
1568
item_id : a. item_id ,
1569
1569
property : prop. clone ( ) ?,
@@ -1575,13 +1575,13 @@ fn read_iprp<T: Read>(src: &mut BMFFBox<T>) -> Result<TryVec<AssociatedProperty>
1575
1575
}
1576
1576
1577
1577
#[ derive( Debug , PartialEq ) ]
1578
- pub enum ImageProperty {
1578
+ pub enum ItemProperty {
1579
1579
Channels ( TryVec < u8 > ) ,
1580
1580
AuxiliaryType ( TryString ) ,
1581
1581
Unsupported ,
1582
1582
}
1583
1583
1584
- impl ImageProperty {
1584
+ impl ItemProperty {
1585
1585
fn clone ( & self ) -> Result < Self > {
1586
1586
Ok ( match self {
1587
1587
Self :: Channels ( val) => Self :: Channels ( val. try_clone ( ) ?) ,
@@ -1598,7 +1598,7 @@ struct Association {
1598
1598
1599
1599
pub struct AssociatedProperty {
1600
1600
pub item_id : u32 ,
1601
- pub property : ImageProperty ,
1601
+ pub property : ItemProperty ,
1602
1602
}
1603
1603
1604
1604
fn read_ipma < T : Read > ( src : & mut BMFFBox < T > ) -> Result < TryVec < Association > > {
@@ -1632,18 +1632,18 @@ fn read_ipma<T: Read>(src: &mut BMFFBox<T>) -> Result<TryVec<Association>> {
1632
1632
Ok ( associations)
1633
1633
}
1634
1634
1635
- fn read_ipco < T : Read > ( src : & mut BMFFBox < T > ) -> Result < TryVec < ImageProperty > > {
1635
+ fn read_ipco < T : Read > ( src : & mut BMFFBox < T > ) -> Result < TryVec < ItemProperty > > {
1636
1636
let mut properties = TryVec :: new ( ) ;
1637
1637
1638
1638
let mut iter = src. box_iter ( ) ;
1639
1639
while let Some ( mut b) = iter. next_box ( ) ? {
1640
1640
// Must push for every property to have correct index for them
1641
1641
properties. push ( match b. head . name {
1642
- BoxType :: PixelInformationBox => ImageProperty :: Channels ( read_pixi ( & mut b) ?) ,
1643
- BoxType :: AuxiliaryTypeProperty => ImageProperty :: AuxiliaryType ( read_auxc ( & mut b) ?) ,
1642
+ BoxType :: PixelInformationBox => ItemProperty :: Channels ( read_pixi ( & mut b) ?) ,
1643
+ BoxType :: AuxiliaryTypeProperty => ItemProperty :: AuxiliaryType ( read_auxc ( & mut b) ?) ,
1644
1644
_ => {
1645
1645
skip_box_remain ( & mut b) ?;
1646
- ImageProperty :: Unsupported
1646
+ ItemProperty :: Unsupported
1647
1647
}
1648
1648
} ) ?;
1649
1649
}
0 commit comments