File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ mod tests {
270
270
. unwrap ( ) ;
271
271
let cap = 1024 ;
272
272
let mut buf = av:: AudioPcmBuf :: with_format ( & format, cap) . unwrap ( ) ;
273
- buf. set_frame_length ( cap) ;
273
+ buf. set_frame_length ( cap) . unwrap ( ) ;
274
274
let data = buf. data_f32 ( ) ;
275
275
let ( n, cap) = if format. is_interleaved ( ) {
276
276
( 1 , channel_count * cap)
@@ -283,6 +283,7 @@ mod tests {
283
283
let sum = left. iter ( ) . sum ( ) ;
284
284
assert_eq ! ( 0.0f32 , sum) ;
285
285
}
286
+
286
287
#[ test]
287
288
fn safe ( ) {
288
289
let channel_count = 2 ;
@@ -292,5 +293,7 @@ mod tests {
292
293
let cap = 1024 ;
293
294
let mut buf = av:: AudioPcmBuf :: with_format ( & format, cap) . unwrap ( ) ;
294
295
let _err = buf. set_frame_length ( 1025 ) . expect_err ( "Should fail" ) ;
296
+ buf. set_frame_length ( 1024 )
297
+ . expect ( "Failed to set max cap frame len" ) ;
295
298
}
296
299
}
You can’t perform that action at this time.
0 commit comments