From 0d677d609bd4a7d887e9b4329eac9ad0ed08ade2 Mon Sep 17 00:00:00 2001 From: Oliver Lillie Date: Wed, 19 Mar 2014 17:31:33 +0200 Subject: [PATCH] bug fix for incorrect isset vs in_array comparison for libvorbis/vorbis normalisation in AutdioFormat --- src/PHPVideoToolkit/AudioFormat.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PHPVideoToolkit/AudioFormat.php b/src/PHPVideoToolkit/AudioFormat.php index 0233d79..83bcf3d 100644 --- a/src/PHPVideoToolkit/AudioFormat.php +++ b/src/PHPVideoToolkit/AudioFormat.php @@ -152,12 +152,12 @@ public function setAudioCodec($audio_codec) // updated. thanks to Varon for providing the research if(in_array($audio_codec, array('mp3', 'libmp3lame')) === true) { - $audio_codec = in_array('libmp3lame',$codecs) ? 'libmp3lame' : 'mp3'; + $audio_codec = in_array('libmp3lame', $codecs) === true ? 'libmp3lame' : 'mp3'; } // fix vorbis - else if($audio_codec === 'vorbis' || $audio_codec === 'libvorbis' ) + else if($audio_codec === 'vorbis' || $audio_codec === 'libvorbis') { - $audio_codec = isset($codecs['libvorbis']) === true ? 'libvorbis' : 'vorbis'; + $audio_codec = in_array('libvorbis', $codecs) === true ? 'libvorbis' : 'vorbis'; } if(in_array($audio_codec, $codecs) === false)