File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ impl MP4File {
127127 . map ( |enc| {
128128 tracing:: info!( "MP4Encoder: Flushing audio encoder" ) ;
129129 enc. flush ( & mut self . output ) . inspect_err ( |e| {
130- error ! ( "Failed to finish video encoder: {e:#}" ) ;
130+ error ! ( "Failed to finish audio encoder: {e:#}" ) ;
131131 } )
132132 } )
133133 . unwrap_or ( Ok ( ( ) ) ) ;
Original file line number Diff line number Diff line change @@ -111,9 +111,16 @@ impl Mp4ExportSettings {
111111
112112 info ! ( "Encoded {encoded_frames} video frames" ) ;
113113
114- encoder
114+ let res = encoder
115115 . finish ( )
116- . map_err ( |e| format ! ( "Failed to finish encoding: {}" , e) ) ?;
116+ . map_err ( |e| format ! ( "Failed to finish encoding: {e}" ) ) ?;
117+
118+ if let Err ( e) = res. video_finish {
119+ return Err ( format ! ( "Video encoding failed: {e}" ) ) ;
120+ }
121+ if let Err ( e) = res. audio_finish {
122+ return Err ( format ! ( "Audio encoding failed: {e}" ) ) ;
123+ }
117124
118125 Ok :: < _ , String > ( base. output_path )
119126 } )
You can’t perform that action at this time.
0 commit comments