Skip to content

Commit 1ee7614

Browse files
committed
Major bugfix (correct codecs never applied)
Correct audio codecs were never applied. For example, AudioFormat_Mkv sets audioCodec to libvorbis, but instead, setAudioCodec function instead sets codec as vorbis. Found the bug when working with mono files.
1 parent 4c66d76 commit 1ee7614

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PHPVideoToolkit/AudioFormat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function setAudioCodec($audio_codec)
211211
if($codecs_in_preference_order !== false){
212212
$audio_codec = array_shift($codecs_in_preference_order);
213213
while(in_array($audio_codec, $codecs) === false && count($codecs_in_preference_order) > 0){
214-
$audio_codec = array_shift($codecs_in_preference_order);
214+
array_push($codecs, $audio_codec);
215215
}
216216
}
217217
}

0 commit comments

Comments
 (0)