Skip to content

Commit

Permalink
Fixed an error where certain types of video streams would cause the e…
Browse files Browse the repository at this point in the history
…ncoder to throw an exception

Signed-off-by: Andrew Welch <andrew@nystudio107.com>
  • Loading branch information
khalwat committed Mar 20, 2019
1 parent af102a1 commit 0e241eb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/services/Transcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,11 @@ public function getFileInfo($filePath, $summary = false)
case 'streams':
foreach ($topLevelValue as $stream) {
$infoSummaryType = $stream['codec_type'];
foreach (self::INFO_SUMMARY[$infoSummaryType] as $settingKey => $settingValue) {
if (!empty($stream[$settingKey])) {
$summaryResult[$settingValue] = $stream[$settingKey];
if (in_array($infoSummaryType, self::INFO_SUMMARY, false)) {
foreach (self::INFO_SUMMARY[$infoSummaryType] as $settingKey => $settingValue) {
if (!empty($stream[$settingKey])) {
$summaryResult[$settingValue] = $stream[$settingKey];
}
}
}
}
Expand Down

0 comments on commit 0e241eb

Please sign in to comment.