Fix error when stream has no codec_name

Sometimes a stream has no codec_name property and the plugin fails
make-only-subtitle-default
Enigma 4 years ago committed by GitHub
parent 0fed4e0ddc
commit 92d568b572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -173,7 +173,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
// check if the file is already hevc
// it will not be transcoded if true and the plugin will be stopped immediately
for (let i = 0; i < file.ffProbeData.streams.length; i += 1) {
if (file.ffProbeData.streams[i].codec_name.toLowerCase() === 'hevc') {
if (file.ffProbeData.streams[i].codec_name && file.ffProbeData.streams[i].codec_name.toLowerCase() === 'hevc') {
response.processFile = false;
response.infoLog += '☑File is already in hevc! \n';
return response;

Loading…
Cancel
Save