From: Marco Date: Thu, 1 May 2014 20:42:59 +0000 (+0200) Subject: Less false positives for MEDIATYPE_VIDEO X-Git-Tag: 1.31.0-rc.0~15167^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=629169ce9bd7991c1ae1839a0983fce8f17b6560;p=lhc%2Fweb%2Fwiklou.git Less false positives for MEDIATYPE_VIDEO Remove the ffmpeg2theora String to suppress false positives when doing type detection on ogg files (Importing pull 23 from github) Bug: 63584 Change-Id: Ib39ed06f895624b55d15a001cb0a2cd3129f4bb0 --- diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php index 3448c6aa5c..f68e109219 100644 --- a/includes/MimeMagic.php +++ b/includes/MimeMagic.php @@ -979,7 +979,7 @@ class MimeMagic { $head = fread( $f, 256 ); fclose( $f ); - $head = strtolower( $head ); + $head = str_replace( 'ffmpeg2theora', '', strtolower( $head ) ); // This is an UGLY HACK, file should be parsed correctly if ( strpos( $head, 'theora' ) !== false ) {