Skip to content

Commit 0e241eb

Browse files
committed
Fixed an error where certain types of video streams would cause the encoder to throw an exception
Signed-off-by: Andrew Welch <andrew@nystudio107.com>
1 parent af102a1 commit 0e241eb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/services/Transcode.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,11 @@ public function getFileInfo($filePath, $summary = false)
462462
case 'streams':
463463
foreach ($topLevelValue as $stream) {
464464
$infoSummaryType = $stream['codec_type'];
465-
foreach (self::INFO_SUMMARY[$infoSummaryType] as $settingKey => $settingValue) {
466-
if (!empty($stream[$settingKey])) {
467-
$summaryResult[$settingValue] = $stream[$settingKey];
465+
if (in_array($infoSummaryType, self::INFO_SUMMARY, false)) {
466+
foreach (self::INFO_SUMMARY[$infoSummaryType] as $settingKey => $settingValue) {
467+
if (!empty($stream[$settingKey])) {
468+
$summaryResult[$settingValue] = $stream[$settingKey];
469+
}
468470
}
469471
}
470472
}

0 commit comments

Comments
 (0)