File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -335,15 +335,18 @@ fn handle(params: HandleParams) -> anyhow::Result<()> {
335335 raw_frames
336336 } else {
337337 vec ! [ (
338- p. data( ) . unwrap ( ) . to_vec( ) ,
338+ p. data( ) . unwrap_or ( & [ ] ) . to_vec( ) ,
339339 video_decoder. width( ) ,
340340 video_decoder. height( ) ,
341341 ) ]
342342 } ;
343343
344344 for ( raw_frame, width, height) in raw_frames {
345345 let codec = if !decode {
346- String :: from ( video_decoder. codec ( ) . unwrap ( ) . name ( ) )
346+ match video_decoder. codec ( ) {
347+ Some ( c) => String :: from ( c. name ( ) ) ,
348+ None => bail ! ( "Unable to get codec name" ) ,
349+ }
347350 } else {
348351 String :: from ( Id :: RAWVIDEO . name ( ) )
349352 } ;
@@ -434,6 +437,7 @@ fn assign_log_level(ffmpeg_log_level: FFmpegLogLevel) -> Level {
434437
435438#[ pymethods]
436439impl FFMpegSource {
440+ #[ allow( clippy:: too_many_arguments) ]
437441 #[ new]
438442 #[ pyo3( signature = ( uri, params,
439443 queue_len = 32 ,
You can’t perform that action at this time.
0 commit comments