File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,12 @@ impl From<fallible_collections::TryReserveError> for Status {
227
227
}
228
228
}
229
229
230
+ impl From < std:: io:: Error > for Status {
231
+ fn from ( _: std:: io:: Error ) -> Self {
232
+ Status :: Io
233
+ }
234
+ }
235
+
230
236
/// Describes parser failures.
231
237
///
232
238
/// This enum wraps the standard `io::Error` type, unified with
Original file line number Diff line number Diff line change @@ -1287,12 +1287,7 @@ fn get_pssh_info(
1287
1287
. try_into ( )
1288
1288
. map_err ( |_| Mp4parseStatus :: Invalid ) ?;
1289
1289
let mut data_len = TryVec :: new ( ) ;
1290
- if data_len
1291
- . write_u32 :: < byteorder:: NativeEndian > ( content_len)
1292
- . is_err ( )
1293
- {
1294
- return Err ( Mp4parseStatus :: Io ) ;
1295
- }
1290
+ data_len. write_u32 :: < byteorder:: NativeEndian > ( content_len) ?;
1296
1291
pssh_data. extend_from_slice ( pssh. system_id . as_slice ( ) ) ?;
1297
1292
pssh_data. extend_from_slice ( data_len. as_slice ( ) ) ?;
1298
1293
pssh_data. extend_from_slice ( pssh. box_content . as_slice ( ) ) ?;
You can’t perform that action at this time.
0 commit comments