This repository was archived by the owner on May 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -153,8 +153,8 @@ module.exports = function(proto) {
153153 // Skip errors on stdin. These get thrown when ffprobe is complete and
154154 // there seems to be no way hook in and close stdin before it throws.
155155 ffprobe . stdin . on ( 'error' , function ( err ) {
156- if ( [ 'ECONNRESET' , 'EPIPE' ] . indexOf ( err . code ) >= 0 ) { return ; }
157- throw err ;
156+ if ( [ 'ECONNRESET' , 'EPIPE' ] . indexOf ( err . code ) >= 0 ) { return ; }
157+ handleCallback ( err ) ;
158158 } ) ;
159159
160160 // Once ffprobe's input stream closes, we need no more data from the
Original file line number Diff line number Diff line change @@ -134,20 +134,4 @@ describe('Metadata', function() {
134134 done ( ) ;
135135 } ) ;
136136 } ) ;
137-
138- it ( 'should handle errors on stream input to ffprobe' , function ( done ) {
139- var faultyStream = new Readable ( { objectMode : true } ) ;
140- faultyStream . _read = function ( ) { } ;
141- setTimeout ( function ( ) {
142- faultyStream . emit ( 'error' , new Error ( 'Dummy stream read error' ) ) ;
143- } , 50 ) ;
144-
145- new Ffmpeg ( )
146- . addInput ( faultyStream )
147- . ffprobe ( function ( err , data ) {
148- assert . ok ( ! ! err ) ;
149- err . message . should . equal ( 'Dummy stream read error' ) ;
150- done ( ) ;
151- } ) ;
152- } ) ;
153137} ) ;
You can’t perform that action at this time.
0 commit comments