Updated codec search routine