diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-03 00:44:18 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-03 00:44:18 +0000 |
commit | d7f8af4f5397d0945fb09c6c72b718ea100c1333 (patch) | |
tree | 4600b6e21b4d5800142e4513be6aa3c5a6e48c8b /lib/class/vainfo.class.php | |
parent | f8def34b7d9bab33acbb33cf10da7a347d04d709 (diff) | |
download | ampache-d7f8af4f5397d0945fb09c6c72b718ea100c1333.tar.gz ampache-d7f8af4f5397d0945fb09c6c72b718ea100c1333.tar.bz2 ampache-d7f8af4f5397d0945fb09c6c72b718ea100c1333.zip |
fix mp4 video file tag parsing
Diffstat (limited to 'lib/class/vainfo.class.php')
-rw-r--r-- | lib/class/vainfo.class.php | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/lib/class/vainfo.class.php b/lib/class/vainfo.class.php index 7a4fe819..a9905539 100644 --- a/lib/class/vainfo.class.php +++ b/lib/class/vainfo.class.php @@ -301,22 +301,25 @@ class vainfo { if ($type == 'flv') { $this->_raw['tags']['flv'] = array(); } + if ($type == 'quicktime') { + $this->_raw['tags']['quicktime'] = array(); + } else { $this->_raw['tags']['avi'] = array(); } - $this->_clean_type($type); + $type = $this->_clean_type($type); return $type; } if ($type = $this->_raw['audio']['streams']['0']['dataformat']) { - $this->_clean_type($type); + $type = $this->_clean_type($type); return $type; } if ($type = $this->_raw['audio']['dataformat']) { - $this->_clean_type($type); + $type = $this->_clean_type($type); return $type; } if ($type = $this->_raw['fileformat']) { - $this->_clean_type($type); + $type = $this->_clean_type($type); return $type; } @@ -448,22 +451,18 @@ class vainfo { case 'mpeg3': return 'mp3'; break; - case 'flac': - return 'flac'; - break; case 'vorbis': return 'ogg'; break; + case 'flac': case 'flv': - return 'flv'; - break; case 'avi': - return 'avi'; - break; + case 'quicktime': + return $type; default: /* Log the fact that we couldn't figure it out */ debug_event('vainfo','Unable to determine file type from ' . $type . ' on file ' . $this->filename,'5'); - return 'unknown'; + return $type; break; } // end switch on type @@ -664,10 +663,10 @@ class vainfo { $array[$tag] = $this->_clean_tag($data['0']); } // end foreach - + // Also add in any video related stuff we might find - if (strpos('video',$this->_raw2['mime_type'])) { - $info = $this->_parse_avi(&$this->_raw2); + if (strpos($this->_raw2['mime_type'],'video') !== false) { + $info = $this->_parse_avi($this->_raw2); $info['video_codec'] = $this->_raw2['quicktime']['ftyp']['fourcc']; $array = array_merge($info,$array); } |