Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 15e1aaf

Browse files
author
Nicolas Joyard
committed
Remove faulty ffprobe input error test
1 parent e1b2651 commit 15e1aaf

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

lib/ffprobe.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

test/metadata.test.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)