@@ -1189,8 +1189,8 @@ fn mp4parse_get_track_video_info_safe(
1189
1189
/// pointer points to a valid `Mp4parseAvifParser`, and that the avif_image
1190
1190
/// pointer points to a valid `AvifImage`. If there was not a previous
1191
1191
/// successful call to `mp4parse_avif_read()`, no guarantees are made as to
1192
- /// the state of `avif_image`. If `avif_image.alpha_item` are set with a
1193
- /// positive`length` and non-null `data`, then the `avif_image` contains an
1192
+ /// the state of `avif_image`. If `avif_image.alpha_item` is set to a
1193
+ /// positive `length` and non-null `data`, then the `avif_image` contains an
1194
1194
/// valid alpha channel data. Otherwise, the image is opaque.
1195
1195
#[ no_mangle]
1196
1196
pub unsafe extern "C" fn mp4parse_avif_get_image (
@@ -1203,14 +1203,12 @@ pub unsafe extern "C" fn mp4parse_avif_get_image(
1203
1203
1204
1204
// Initialize fields to default values to ensure all fields are always valid.
1205
1205
* avif_image = Default :: default ( ) ;
1206
- let image_ref = & mut ( * avif_image) ;
1207
-
1208
1206
let context = ( * parser) . context ( ) ;
1209
1207
1210
- image_ref . primary_item . set_data ( context. primary_item ( ) ) ;
1208
+ ( * avif_image ) . primary_item . set_data ( context. primary_item ( ) ) ;
1211
1209
if let Some ( context_alpha_item) = context. alpha_item ( ) {
1212
- image_ref . alpha_item . set_data ( context_alpha_item) ;
1213
- image_ref . premultiplied_alpha = context. premultiplied_alpha ;
1210
+ ( * avif_image ) . alpha_item . set_data ( context_alpha_item) ;
1211
+ ( * avif_image ) . premultiplied_alpha = context. premultiplied_alpha ;
1214
1212
}
1215
1213
1216
1214
Mp4parseStatus :: Ok
0 commit comments