From 459abaa2386fd1935abf8b763aee046222b13a01 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Wed, 17 Mar 2010 23:48:16 +0100 Subject: Fixed video streaming --- bin/files.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'bin/files.php') diff --git a/bin/files.php b/bin/files.php index ba82d21..d87d332 100755 --- a/bin/files.php +++ b/bin/files.php @@ -11,9 +11,18 @@ function mediagetinfostream($stream) $info['name'] = basename($stream); $info['desc'] = ""; $info['duration'] = sec2hms($fileinfo['playtime_seconds']); - $info['format'] = $fileinfo['fileformat']; - $info['video'] = $fileinfo['video']['codec']; - $info['audio'] = $fileinfo['audio']['codec']; + if ($fileinfo['fileformat']) + $info['format'] = $fileinfo['fileformat']; + else + $info['format'] = "unkown"; + if ($fileinfo['video']['codec']) + $info['video'] = $fileinfo['video']['codec']; + else + $info['video'] = "unkown"; + if ($fileinfo['audio']['codec']) + $info['audio'] = $fileinfo['audio']['codec']; + else + $info['audio'] = "unkown"; $info['resolution'] = $fileinfo['video']['resolution_x'] ."x" .$fileinfo['video']['resolution_y']; return $info; -- cgit v1.2.3