Skip to content

Commit

Permalink
bug fix for incorrect isset vs in_array comparison for libvorbis/vorb…
Browse files Browse the repository at this point in the history
…is normalisation in AutdioFormat
  • Loading branch information
buggedcom committed Mar 19, 2014
1 parent b24c6cc commit 0d677d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PHPVideoToolkit/AudioFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0d677d6

Please sign in to comment.