use codec_id so that the codec does not need to be opened