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

Commit 846591f

Browse files
committed
Fix audio being detected as video.
ffprobe views MP3, OPUS, OGG, and FLAC as having a video stream with dispositon:attached_pic set to 1. Filter all of these instances out of the isVideo check, so they are correctly detected as audio.
1 parent 04b5c04 commit 846591f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Detectives/ffmpegDetective.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private function ffprobeHasVideo()
9898
{
9999
foreach ($this->metadata['streams'] as $streamIndex => $stream)
100100
{
101-
if (isset($stream['codec_type']) && $stream['codec_type'] === "video")
101+
if (isset($stream['codec_type']) && $stream['codec_type'] === "video" && $stream['disposition']['attached_pic'] !== 1)
102102
{
103103
return $streamIndex;
104104
}

0 commit comments

Comments
 (0)